Posted 30 August 2012 - 11:36 AM
Hey again, back already with another question, how do you select a certain character in a string, in vbs you can say
and you can do the same for the right, using this you can build the following function (I will use lua syntax as you are familiar with it)
I need this for a game design but I don't know if there are any functions like this in LUA, I have checked the string manipulation area in the manual with no success
left(string,num)
and it will return num letters from the left. for exampleleft('hello world!',3)
would return 'hel'and you can do the same for the right, using this you can build the following function (I will use lua syntax as you are familiar with it)
local function atloc(string,at,till)
return right(left(string,at+till),till)
end
and then you can sayatloc('hello world',2,3)
and it would return 'ell'I need this for a game design but I don't know if there are any functions like this in LUA, I have checked the string manipulation area in the manual with no success