[String->RemoveLeading] removes all instances of the parameter from the beginning of the string. Modifies the string and returns no value. The method takes two forms.
The first form requires a single string parameter. The pattern is not case sensitive.
The second form requires a regular expression parameter.
'String Object'->removeleading('String Pattern')
'String Object'->removeleading('Regular Expression')
Use the [String->RemoveLeading] method. The following example removes the characters "The " from the beginning of a string, then outputs the string.
Code
local('s') = 'The quick white rhino'
#s->removeleading('The ')
#s
Result
quick white rhino
Use the [String->RemoveLeading] method. The following example removes 1-3 alphabetic characters followed by a white space character from the beginning of a string, then outputs the string.
Code
local('s') = 'The quick white rhino'
#s->removeleading(regexp('[a-zA-Z]{1,3}\\s'))
#s
Result
quick white rhino
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments