trim()

 

The trim() function in Querix4GL enables the developer to remove any whitespace (any characters that represents a space) from the beginning and the end of a string.

 

Usage

 

The trim() function takes an input string as its argument and removes all whitespace from the beginning and the end of that string. If the string is a sentence with spaces between words then the trim() function will leave the whitespace between the words:

 

      trim(‘  The cat sat on the mat   ’)

      trim(‘  Spaceship  ’)

 

Would return the strings:

 

      ‘The cat sat on the mat’

      ‘Spaceship’

 

Adding the two strings together would produce the following string:

 

      ‘The cat sat on the matSpaceship’