length of Int

sterlingy

Active Member
Licensed User
Longtime User
How do I determine the length of an Int?

myVar = 347

I want to use a method that would return 3 because there are three digits.

-Sterling
 

sterlingy

Active Member
Licensed User
Longtime User
One simple way that imediately springs to mind, there are probably others
B4X:
Dim s As String
Dim i As Int
i = 347
s = i
Msgbox(s.Length, s)

Funny that's what you suggested, because that's what I was just coding. Two great minds, one thought!

Thanks anyway.

-Sterling
 
Upvote 0
Top