Created
October 22, 2015 13:54
-
-
Save H3xept/27d2d06aaef6182207fa to your computer and use it in GitHub Desktop.
This file contains 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
size_t custom_strlen(char* string) | |
{ | |
size_t _strlen = 0; | |
while('\0' != *string) | |
{ | |
string++; | |
_strlen++; | |
} | |
return _strlen; | |
} | |
unsigned int custom_strcmp(char* str1, char* str2) | |
{ | |
unsigned int rt = 1; | |
for(int _strlen = custom_strlen(str1); _strlen > 0; _strlen--) | |
{ | |
if(*(str1+_strlen) != *(str2+_strlen)) | |
{ | |
rt = 0; | |
break; | |
} | |
} | |
return rt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment