Re: strcmp()?
| From: | Joshua Kehn | Date: | Mon, 23 May 2011 13:56:15 +0000 |
| Subject: | Re: strcmp()? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313109@lists.php.net to get a copy of this message | ||
On May 23, 2011, at 9:47 AM, Alex Nikitin wrote:
>
> It depends on what you need to check, josh :)
>
> If you wanted to say find an anagram, or do a search with some typo correction, strcmp can be
> many times more helpful then a ===, that said comparing 2 strings to be equal === works about 20%
> quicker, so it works better for comparing two strings for equality (or unequality) anyways. There is
> no confusion, strcmp has a documented way in which it is to work in posix-compliant languages,
> ISO/IEC 9899:1999, 7.21.4.2, so as long as you follow the ISO guidelines for the scrcmp checking,
> your code should work correctly...
>
> --
> The trouble with programmers is that you can never tell what a programmer is doing until it’s
> too late. ~Seymour Cray
It's good to know it's functionality is available in the case that I ever need it.
Regards,
-Josh
____________________________________
Joshua Kehn | Josh.kehn@gmail.com
http://joshuakehn.com