Created
July 23, 2021 17:35
-
-
Save alsamitech/1610657a9c814d1bbdbca8086443058d to your computer and use it in GitHub Desktop.
starts_with - starts with but even better (replace _Bool with char if you're using anything before C99)
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 starts_with(const char* in, const char* sw){ | |
| for(size_t i=0;sw[i];i++) | |
| if(in[i]!=sw[i]) | |
| return 1; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment