This item was deprecated in version 2020r2. Please use Integer.ToString as a replacement.


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


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 Text:

Var i As Integer = 42
Var t As Text = "The number is " + i.ToText

Add to an Integer directly and convert the new value:

Var n As Integer = 5
Var t As Text = Integer(n + 1).ToText ' t = "6"

Formats the Integer value:

value = 1245
Var t As Text = value.ToText ' t = "1245"
t = value.ToText(Xojo.Core.Locale.Current, "#,###") ' t = "1,245"


All project types on all supported operating systems.