Created
July 27, 2021 04:30
-
-
Save alsamitech/3261055c684375ff5fb51b1fa32e0bb2 to your computer and use it in GitHub Desktop.
strcmp_until - faster than doing strncmp with passing until_char
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
_Bool strcmp_until(const char* s1,const char* s2,const char until){ | |
for(size_t i=0;s1[i]!=until;i++) | |
if(s1[i]!=s2[i])return 1; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment