Is it possible to detect length of IntValue?

I can detect the length of Text in characters, but can I detect the length of IntValue?

#1:

local ConvertToString = IntValue.Value.tostring()

local CharLength = string.len(ConvertToString)

#2:

local ConvertToString = IntValue.Value.tostring()

local LettersArray = { }
for i, v in pairs(ConvertToString) do
table.insert(LettersArray, v)
end

local CharLength = #LettersArray

#3:

local CharLength = math.ceil(math.log10(IntValue.Value))

You can use utf8.len().
Example:

print(utf8.len(456)) --> 3
print(utf8.len(6e4)) --> 5
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.