How do you find if a string start with another string?

I’m working on a username search system and I need to see if a string only starts with a string and doesn’t include it.

if string.sub(Text, 1, #Input) == Input then
You can also use string.lower if you want to ignore capitals.
if string.sub(Text:lower(), 1, #Input) == Input:lower() then

2 Likes

Thanks, works perfectly!
30char

1 Like