Check if is string
Check if is string
How can i check if a variable is a string or a number etc ?
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Check if is string
Code: Select all
if( type(variable) == "number" ) then
-- it's a string
elseif( type(variable) == "string" ) then
-- it's a number
end
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests