world.Trim
Trims leading and trailing spaces from a string
Prototype
BSTR Trim(BSTR Source);
Description
This is supplied as a convenient way of removing leading and trailing spaces from a supplied string.
VBscript example
world.note "*" & world.trim (" mystring ") & "*"
Jscript example
world.Note("*" + world.Trim(" mystring ") + "*");
PerlScript example
$world->Note("*" . $world->Trim(" mystring ") . "*");
Python example
world.Note("*" + world.Trim(" mystring ") + "*")
Lua example
Note("*" .. Trim(" mystring ") .. "*")
Return value
The source string with any leading or trailing spaces removed.
Related topic
See also
| Function | Description |
|---|---|
| FixupEscapeSequences | Converts "escape sequences" like \t to their equivalent codes. |
| FixupHTML | Fixes up text for writing as HTML |
| Replace | Replaces one substring with another |