diff options
Diffstat (limited to 'rushs/evalexpr/my_strcmp/my_strcmp.c')
| -rw-r--r-- | rushs/evalexpr/my_strcmp/my_strcmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rushs/evalexpr/my_strcmp/my_strcmp.c b/rushs/evalexpr/my_strcmp/my_strcmp.c new file mode 100644 index 0000000..d3ef3e3 --- /dev/null +++ b/rushs/evalexpr/my_strcmp/my_strcmp.c @@ -0,0 +1,11 @@ +#include "my_strcmp.h" + +int my_strcmp(const char *s1, const char *s2) +{ + for (; *s1 && *s1 == *s2; s1++, s2++) + { + continue; + } + + return *s1 - *s2; +} |
