Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void strcpy(char target[], const char source[]) {
- while (*target++ = *source++);
- }
- int strcmp(const char lhs[], const char rhs[]) {
- while (*lhs || *rhs) {
- if (*lhs++ != *rhs++) {
- return *(lhs - 1) - *(rhs - 1);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement