RightTrim

From Catglobe Wiki
Revision as of 09:55, 7 March 2011 by 127.0.0.1 (talk | contribs) (jrfconvert import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



rightTrim

Removes all occurrences of a set of characters specified in an array from the end of the input string.

Syntax

rightTrim(inputString, charArray)

rightTrim(inputString)

Arguments

inputString: is a string expression.

charArray: is an array of string whose items are only characters to be trimmed. If this parameter is not specified, the function will remove all occurrences of empty spaces from the end of the input string.

Return type

string

Example

array charArray = {"a", "b", "c"};

string input = "catglob";

string result = rightTrim(input, charArray);

print(result);

//catglo

nput = " catglobe ";

result = rightTrim(input);

print(result);

//" catglobe"

Availability

Version 5.2