Lasso Soft Inc. > Home

[String->Remove]

[String->Remove] removes a portion of the base string. Requires a single parameter which is the first character to be removed. An optional second parameter specifies how many characters should be removed. The second parameter defaults to removing all the characters to the end of the string.

This tag returns no value, but the base string is modified in-place.

  • Syntax
  • Parameters
[Variable: 'myString' = 'String Value']
[$myString->(Remove: 5)]
[Variable: 'myString']

[$myString->(Remove: 5, 5)]
Required Parameters
Offset The offset into the base string to be removed.
Optional Parameters
Length The number of characters to be removed from the base string. Defaults to the length of the string.
Examples

To remove a portion of a string:

Use the [String->Remove] tag. The following example removes the word 'brown' from the sample string.

[Variable: 'myString' = 'A quick brown fox']
[$myString->(Remove: 9,6)]
[Output: $myString]
Result:
A quick fox
Tag Link [String->Remove] Category String
Type Member Data Source Any
Support Preferred Version 6.0
Output Type None Security None
Implementation LCAPI Sets Lasso 7.0, Lasso 6.0

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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft