Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you find a string in a string, regardless of case?

I want to find a string in a string without it being case sensitive.

I thought of a way to possibly do it, but I can't help but think there should be a much simpler way, please tell me if you know a way to do it.

1 answer

✓ Accepted answer
local found = mainString:lower():find(searchString:lower(),1,true) ~= nil

where mainString and searchString are previously defined.

1 comment

0

wow i'm actually retarded, I didn't take into account that you could lower both of the strings.

This discussion is preserved as it was. New answers, comments, and votes are closed.