Skip to content

Instantly share code, notes, and snippets.

@alsamitech
Created June 28, 2021 20:05
Show Gist options
  • Select an option

  • Save alsamitech/343a86610744dd863eb03a8388362a4d to your computer and use it in GitHub Desktop.

Select an option

Save alsamitech/343a86610744dd863eb03a8388362a4d to your computer and use it in GitHub Desktop.
str_first - returns whichever character of first is the first character in str
char str_first(char* str, char* first){
while(*str){
for(size_t i=0;first[i];i++)
if(*str==first[i]) return *str;
str++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment