TextTrim

Revision as of 03:35, 14 January 2008 by Lchrisman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


TextTrim(text,leftOnly,rightOnly,trimChars)

Removes leading and trailing spaces from the text. When only one parameter is specified, leading and trailing space, tab, CR and LF characters are removed. When either optional leftOnly or rightOnly' parameter is specified as True, the text is trimmed on one side only. You can also control which characters are trimmed using the optional trimChars.

This function is only available in Analytica 4.0.1 or later.

Examples

TextTrim("  Hello world  ")  → "Hello World"
TextTrim("  Hello world  ",leftOnly:True) → "Hello world  "
TextTrim("  Hello world  ",rightOnly:True) → "  Hello world"
TextTrim("  [One,Two,Three]  ",trimChars:" []") → "One,Two,Three"

The one parameter form of the function is equivalent to:

TextTrim(text,leftOnly:false,rightOnly:false,trimChars:" "&Chr(9)&Chr(10)&Chr(13) )

See also

Comments


You are not allowed to post comments.