Lasso Soft Inc. > Home

[String->Get]

[String->Get] returns a specific character from the string. Requires a single integer parameter.

  • Syntax
  • Parameters
[String Variable->(Get: Character Index)]
Required Parameters
String Value The string which is to be examined.
Character Index The index of the character which should be returned.
Examples

To get each character from a string:

Use the [String->Get] tag. The following example fetches each character of a string individually and displays them on separate lines.

[Variable: 'theString' = 'Blue World']
[Loop: $theString->Length]
  <br>[Output: $theString->(Get: Loop_Count)]
[/Loop]
Result:
<br>B
<br>l
<br>u
<br>e
<br>
<br>W
<br>o
<br>r
<br>l
<br>d
Tag Link [String->Get] Category String
Type Member Data Source Any
Support Preferred Version 5.0
Output Type String (Character) Security None
Implementation Internal Sets Lasso 6.0, Lasso 5.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