Difference between revisions of "RightTrim"

From Catglobe Wiki
Jump to: navigation, search
 
Line 1: Line 1:
[[Category:String_Functions]]
+
{{HelpFiles}}  
{{HelpFiles}}
+
 
 +
==== rightTrim ====
  
====rightTrim====
+
Removes all occurrences of a set of characters specified in an array from the end of the input string.
  
Removes all occurrences of a set of characters specified in an array from the end of the input string.
+
'''Syntax'''
  
'''Syntax'''
+
rightTrim(''inputString, charArray'')
  
rightTrim(''inputString, charArray'')
+
rightTrim(''inputString'')  
  
rightTrim(''inputString'')
+
'''Arguments'''  
  
'''Arguments'''
+
''inputString'': is a string expression.
  
''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.  
  
''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'''  
  
'''Return type'''
+
string
  
string
+
'''Example'''
  
'''Example'''
+
''array charArray = {"a", "b", "c"};''  
  
''array charArray = {"a", "b", "c"};''
+
''string input = "catglob";''  
  
''string input = "catglob";''
+
''string result = rightTrim(input, charArray);''  
  
''string result = rightTrim(input, charArray);''
+
''print(result);''  
  
''print(result);''
+
''//catglo''  
  
''//catglo''
+
''input = " catglobe ";''  
  
''nput = " catglobe ";''
+
''result = rightTrim(input);''  
  
''result = rightTrim(input);''
+
''print(result);''  
  
''print(result);''
+
''//" catglobe"''  
  
''//" catglobe"''
+
'''Availability'''  
  
'''Availability'''
+
Version 5.2 __NOTOC__ <!-- imported from file: 684.htm-->
  
Version 5.2
+
[[Category:String_Functions]]
__NOTOC__
 
<!-- imported from file: 684.htm-->
 

Latest revision as of 11:49, 22 December 2011



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

input = " catglobe ";

result = rightTrim(input);

print(result);

//" catglobe"

Availability

Version 5.2