Integer.Parse

From Xojo Documentation

Shared Method

Integer.Parse(value As String, Optional locale As Locale) As Integer

New in 2019r2

Converts the string passed to an Integer value.


Shared Method

Integer.Parse(theText As Text, Optional locale As Xojo.Core.Locale) As Integer

Converts theText to an Integer value.

Notes

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

Numbers are converted only if they are found at the beginning of the text. Any numbers that follow a non-numeric value are ignored. Empty text returns 0.

Sample Code

Convert String/Text to an Integer:

Var i As Integer
i = Integer.Parse("123ABC")
// i = 123