LassoScript Utility
Basics Browse Detail

[String_Extract]

Tag Link [String_Extract] Category String
Type Substitution Source Available No
Support Preferred Version 2.5
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x, Lasso 2.5

Description

[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

[String_Extract: 'String Value',
  -StartPosition=Position,
  -EndPosition=Position]

Parameters

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]

ng Va

Related Tags

Category Tags