Lasso Soft Inc. > Home

[ integer->asString ]

Method

The [integer->asString] method formats the integer as a string. This method replaces the [Integer->SetFormat] tag from Lasso 8.x and earlier. In Lasso 9 integers and decimals have no state, and so they cannot carry around their formatting information.

Parameter Description
-hexaDecimal Expresses the integer as a hexadecimal value.
-padding Specifies the desired width in character of the output.
-padChar Specifies the character to use to pad the output. Defaults to a space.
-padRight If set to True the output will be padded on the right. By default the output will be padded on the left.
-groupChar Specifies the desired character to use for thousands grouping. Defaults to the empty string so thousands grouping is not performed.
  • Syntax
Integer Value->asString(
	-hexadecaim = Boolean Value,
	-padding = Integer Value,
	-padChar = 'Character Value',
	-padRight = Boolean Value,
	-groupchar = 'Character Value'
)
Examples
  • Beginner

To format an integer as a string:

Use the [integer->asString] method. The following example formats a integer as a string.

Code

123456789->asString(-GroupChar=',')

Result

123,456,789

Recent Comments

No Comments found

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