Integer.ToString

From Xojo Documentation

Method

Integer.ToString(Optional locale As Locale) As String

New in 2019r2

Supported for all project types and targets.

Converts the Integer to a String value using an optional locale.


Method

Integer.ToString(locale As Locale, format As String) As String

New in 2019r2

Supported for all project types and targets.

Converts the Integer to a String value using the specified locale and format.

Notes

If no locale is specified, then Locale.Raw is used.

Refer to the Unicode Technical Standard #35, appendix G (Number Format Patterns) for information on how to specify a format.

Sample Code

Convert an Integer value to a String:

Var i As Integer = 42
Var t As String = "The number is " + i.ToString

Add to an Integer directly and convert the new value:

Var n As Integer = 5
Var t As String = Integer(n + 1).ToString // t = "6"

Formats the Integer value:

value = 1245
Var t As String = value.ToString // t = "1245"
t = value.ToString(Locale.Current, "#,###") // t = "1,245"