Contents Previous Next Subchapters

Removing Trailing Spaces
Syntax strclip(text)
See Also deblank , clipstr , strreplace , findstr , align , ntoa

Description
Returns a copy of text in which the trailing spaces are deleted, where text is a character matrix.

If text has more than one row, the trailing spaces are all spaces past the last column that has a non space character in it.

If all the characters in text are spaces, the column dimension of the return value is zero.

Example
     str = "Jack "
     print [DQUOTE, str, DQUOTE]
returns
     "Jack "
if you continue by entering
     print [DQUOTE, strclip(str), DQUOTE]

O-Matrix will respond
     "Jack"

Mlmode
In Mlmode this function is called deblank instead of strclip. If in Mlmode you enter,
     str = 'Jack ';
     [DQUOTE, str, DQUOTE]
returns
     "Jack "
if you continue by entering
     [DQUOTE, deblank(str), DQUOTE]

O-Matrix will respond
     "Jack"