Created
April 26, 2010 04:52
-
-
Save benatkin/378983 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def iequals(str1, str2): | |
| """Returns true if two strings are equal in a case-insensitive comparison.""" | |
| import re | |
| return re.match(re.escape(str1) + r'\Z', str2, re.I) is not None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment