Lasso Soft Inc. > Home

[String_Extract]

[String_Extract] takes three parameters: a string, a -StartPosition keyword/value parameter, and a -EndPosition keyword/value parameter. Returns a substring from -StartPosition to -EndPosition.

Note: This tag performs a similar operation to [String->SubString].

  • Syntax
  • Parameters
[String_Extract: 'String Value',
  -StartPosition=Position,
  -EndPosition=Position]
Required Parameters
String Value The string which is to be modified.
-StartPosition The character index of the start of the extracted string.
-EndPosition The character index of the end of the extracted string.
Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicity encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.
Examples

To extract a portion of a string:

Use the [String_Extract] tag. The following example extracts five characters from the string, starting at position 5.

[String_Extract: 'String Value', -StartPosition=5, -EndPosition=9]
Result:
ng Va
Tag Link [String_Extract] Category String
Type Substitution Data Source Any
Support Preferred Version 2.5
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0,LDML3x,LDML25

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