Created
October 6, 2017 00:41
-
-
Save dkrutsko/9fce633604c54986d0d941bc60d2e511 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
template<typename type> | |
static bool IsStrEq | |
(const type* a, const type* b) | |
{ | |
// Handle potential null cases | |
if (!a || !b) return !a && !b; | |
// Perform standard comparison | |
while (*a != '\0' && *a == *b) | |
{ | |
++a; | |
++b; | |
} | |
// Return result | |
return *a == *b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment