MEL How-To #79 | ||
| ||
How do I perform a case-insensitive string comparison?Wrap both strings with either " string $a = "WindowsNT"; string $b = "windowsnt"; print ( $a == $b ); // Result: 0 // print ( tolower( $a ) == tolower( $b ) ); // Result: 1 // print ( toupper( $a ) == toupper( $b ) ); // Result: 1 // | ||
Copyright ©2005 by Bryan Ewert, maya@ewertb.com Maya is a Registered Trademark of Alias |