
Removes leading and trailing blanks from a character string.
StrTrim(string[,flags])
(s) string: a string with unwanted spaces at the beginning and/or end
(i) flags: (optional) specifies where spaces will be removed, see below
(s) string devoid of leading and/or trailing spaces, depending on flag value.
This function removes spaces and tab characters from the beginning and end of a text string.
Flags
|
value |
meaning |
|
1 |
Remove space and tabs from left-hand side of string |
|
2 |
Remove space and tabs from right-hand side of string |
|
3 |
Remove space and tabs from both sides of string. Default action if value not specified. |
mydata = ""
While mydata != "exit"
mydata = AskLine("STRTRIM", "Type stuff ('cancel' quits)", "", 0)
mydata = StrTrim(mydata)
Display(4,"STRTRIM",">%mydata%<")
EndWhile
Exit