LassoScript Utility
Basics Browse Detail

[String->Substring]

Tag Link [String->Substring] Category String
Type Member Source Available No
Support Preferred Version 5.0
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

Description

[String->Substring] returns a substring. The start of the substring is defined by the first parameter and the length of the substring is defined by the second parameter. Requires two integer parameters.

Syntax

[String Variable->(SubstringOffsetLength)]

Parameters

Required Parameters
Offset The starting index of the substring to be returned.
Optional Parameters
Length The length of the substring which is to be returned. If omitted, defaults to returning the remainder of the string.

Examples

To return the first 1024 characters from a field:

Use the [String->Substring] tag to return the first 1024 characters of a field value. The field Description is stored in a variable by the same name and then trimmed to 1024 characters.

[Var: 'Description'=(Field: 'Description')]
[(Var:'Description')->(Substring: 1, 1024)]

Related Tags

Category Tags