If you want to make it case insensitive you have to add a lot of alternatives to the second way. With 3 letters it could be lots of strings:
abc
Abc
aBc
abC
ABc
AbC
aBC
ABC
But you can easily handle that by using [man]strcasecmp[/man] or [man]strtolower[/man] to get the whole string to lowercase.
Which one is fastest? I have no idea, use [man]microtime[/man] and run a couple of thousand strings (both matches and no matches) and you will see. But I would not worry about the time, it might differ one or two milliseconds (probably less), takes longer to ask the question than it ever will save.