I want to compare two strings ^_^/>
I need It for my OS cuz It have two login systems (one with the http API (mysql) and one with user data on the computer). So, or the second oneI need to compare two SHA1 Hashs :)/>
how can I do that?
if 'stringTest1' == 'stringText1' then
print('they match')
else
print('they don't match')
end
BUGFIX:print('they don't match')
print("they don't match")
Thx :)/>if 'stringTest1' == 'stringText1' then print('they match') else print('they don't match') end
I just came home from my girlfriend's house when it is 49F outside. :P/> I am could and tired :P/> I should stop coming on Ask A Pro at 8AM…BUGFIX:print('they don't match')
print("they don't match")
Nice grammar :P/>I am could and tired
local function check(firstStr, secStr)
if firstStr ~= secStr then
return false
end
return true
end
Everything is better with functions ^_^/>if string.lower(hash1) == string.lower(hash2) then
print('they match')
else
print('they don\'t match')
end
*Cold. That just shows how much I suck at spelling at 8AM :P/>Nice grammar :P/>I am could and tired
Why not justEverything is better with functions ^_^/>local function check(firstStr, secStr) if firstStr ~= secStr then return false end return true end
local function check(firstStr, secStr)
return firstStr == secStr
end
One of my pet peeves is when people use an if statement to then only return a boolean, just return the if statements condition!!!Hehe, I'll have to remember that :P/> (Not to annoy you of course, I would never do that :)/>)One of my pet peeves is when people use an if statement to then only return a boolean, just return the if statements condition!!!