Al3grab Posted January 9, 2012 Posted January 9, 2012 Hi , i want to Extract a number from a string example : i have "arena 20" string , i need a way to make a function that returns "20" only . any help ?
FatalTerror Posted January 9, 2012 Posted January 9, 2012 Return only the number... Try to use gettok function ? string gettok ( string text, int tokenNumber, string / int separatingCharacter ) local myarea = "Area 20" local result = gettok ( myarea, 2, string.byte(' ') )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now