Difference between revisions of "LeftTrim"

From Catglobe Wiki
Jump to: navigation, search
Line 2: Line 2:
 
{{HelpFiles}}
 
{{HelpFiles}}
  
====leftTrim====
+
==== leftTrim ====
  
Removes all occurrences of a set of characters specified in an array from the beginning of the input string.
+
Removes all occurrences of a set of characters specified in an array from the beginning of the input string.  
  
'''Syntax'''
+
'''Syntax'''  
  
leftTrim(''inputString'', ''charArray'')
+
leftTrim(''inputString'', ''charArray'')  
  
leftTrim(''inputString'')
+
leftTrim(''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 from the beginning of the input. If this one is not specified, the function will remove all occurrences of empty spaces from the beginning of the input string.
+
''charArray'': is an array of string whose items are only characters to be trimmed from the beginning of the input. If this one is not specified, the function will remove all occurrences of empty spaces from the beginning 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 input1 = "catglob";''
  
string result = leftTrim(input, charArray);
+
''string result1 = leftTrim(input1, charArray);''
  
print(result);
+
''print(result1);''
  
//tglob
+
''//tglob''
  
string input = " catglobe ";
+
''string input2 = " catglobe ";''
  
result = leftTrim(input);
+
''string result2 = leftTrim(input2);''
  
print(result);
+
''print(result2);''
  
//"catglob "
+
''//"catglob " ''
  
'''Availability'''
+
'''Availability'''  
  
Version 5.2
+
Version 5.2 __NOTOC__ <!-- imported from file: 683.htm-->
__NOTOC__
 
<!-- imported from file: 683.htm-->
 

Revision as of 11:43, 22 December 2011



leftTrim

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

Syntax

leftTrim(inputString, charArray)

leftTrim(inputString)

Arguments

inputString: is a string expression.

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

Return type

string

Example

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

string input1 = "catglob";

string result1 = leftTrim(input1, charArray);

print(result1);

//tglob

string input2 = " catglobe ";

string result2 = leftTrim(input2);

print(result2);

//"catglob "

Availability

Version 5.2