Skip to content

Instantly share code, notes, and snippets.

@alsamitech
Created July 26, 2021 07:39
Show Gist options
  • Save alsamitech/6d83b89b58aafc3ba8529f8f9621e8b1 to your computer and use it in GitHub Desktop.
Save alsamitech/6d83b89b58aafc3ba8529f8f9621e8b1 to your computer and use it in GitHub Desktop.
_Bool starts_with_word(const char* str, const char* word){
for(size_t i=0;;i++){
if(!((str[i]>='A'&&str[i]<='Z')||(str[i]>='a'&&str[i]<='z')||str[i]=='_')){
if(word[i])return 1;
break;
}
if(str[i]!=word[i]){
return 1;
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment