STRIM$ function

Purpose: STRIM$ returns a substring of a string stripped of redundant space characters. Spaces at the left and right ends of the string are removed. Multiple spaces between words in the string are reduced to one space.


 Syntax:

 SubStr$ = STRIM$(MainStr$)

 Parameters:

  • SubStr$ Returned substring of a string stripped of redundant space characters.
  • MainStr$ String to be stripped of redundant space characters.

Example:


 DIM SubStr$
 SubStr$ = STRIM$(" 1   2        3          4 ")
 PRINT SubStr$

Result:

SubStr$ will be "1 2 3 4"