Lasso Soft Inc. > Home

[String->CharDigitValue]

[String->CharDigitValue] returns the integer value of a specified character or -1 if the character is alphabetic. The character within the base string to be inspected is specified starting from 1 for the first character in the string.

  • Syntax
  • Parameters
[Output: '1'->(CharDigitValue: 1)]

<?LassoScript
Variable: 'myString' = '1000';
Variable: 'Result' = $myString->(CharDigitValue: 1);
?gt;
Required Parameters
Base String The string to be inspected.
Position The character within the string to inspect.
Examples

To return the digit value for a character:

Use the [String->CharDigitValue] tag. The following example returns the integer value of the fourth character of a string.

[Output: '2001'->(CharDigitValue: 4)]
Result:
1
Tag Link [String->CharDigitValue] Category String
Type Member Data Source Any
Support Preferred Version 7.0
Output Type Integer Security None
Implementation Sets Lasso 7.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