Tockra Posted July 11, 2010 Posted July 11, 2010 Hello Guis, i want do ask, how i can make out "h" "H" with an lua function? Is it doable? I want build a function, who returns from a string all variants of big and small letters Like : "te" = "te","tE","Te","TE"
AeroXbird Posted July 11, 2010 Posted July 11, 2010 Maybe use the LUA wiki next time: string.upper(string)
Tockra Posted July 11, 2010 Author Posted July 11, 2010 Okay thank you... One other question, exist a function, who make returns with all variant a table or must i do it alone, already ?
MaddDogg Posted July 11, 2010 Posted July 11, 2010 There is no function that does this. But a tip.. read the reference: http://www.lua.org/manual/5.1/
LonelyRoad Posted July 12, 2010 Posted July 12, 2010 I guess an easier way for him to do this is define a variable IE: local typesofletter = "te" or "tE" or "Te" or "TE" I think that's all the types...
dzek (varez) Posted July 12, 2010 Posted July 12, 2010 local typesofletter = "te" or "tE" or "Te" or "TE" what is this? afaik this will be true you mean table maybe? anyway 'te' was an example.. wanna do the same for: iamveryluckyman ? ;p Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
LonelyRoad Posted July 12, 2010 Posted July 12, 2010 local typesofletter = "te" or "tE" or "Te" or "TE" what is this? afaik this will be true you mean table maybe? anyway 'te' was an example.. wanna do the same for: iamveryluckyman ? ;p Did I just fail that bad? Fuck tables I haven't done that shit yet. iamverysillyman <-- You wanna do that one?
dzek (varez) Posted July 12, 2010 Posted July 12, 2010 Did I just fail that bad? i think so.. good idea is not to giving random advices when you dont know how to solve problem iamverysillyman <-- You wanna do that one? nope, but i can write a generator for it Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
LonelyRoad Posted July 12, 2010 Posted July 12, 2010 Did I just fail that bad? i think so.. good idea is not to giving random advices when you dont know how to solve problem My understanding of it is vague, I just assumed that used in the right way that one could easily check if any of it's values exist. You've enlightened me iamverysillyman <-- You wanna do that one? nope, but i can write a generator for it Get writing then
dzek (varez) Posted July 12, 2010 Posted July 12, 2010 Get writing then i dont think anybody really needs it better way than checking all of possibilities it to do something like: local mystring = "IamGOD" local yourstring = "IAmgOd" local result = compareNonCaseSensitive(mystring, yourstring) if (result) then outputChatBox("yes, strings are the same!") else outputChatBox("no, strings are different") end function compareNonCaseSensetive(str1, str2) if (str1==nil or str2==nil) then return false end if (string.lower(tostring(str1)) == string.lower(tostring(str2))) then return true else return false end end this will output yes, strings are the same! Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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