Skip to content

Instantly share code, notes, and snippets.

@alsamitech
Created June 28, 2021 04:44
Show Gist options
  • Select an option

  • Save alsamitech/3885d114cff8e90c91d98ef98f47e5d3 to your computer and use it in GitHub Desktop.

Select an option

Save alsamitech/3885d114cff8e90c91d98ef98f47e5d3 to your computer and use it in GitHub Desktop.
void str_replace_map(char* str, char* replace, char* with){
for(size_t i=0;str[i];i++)
for(size_t ii=0;replace[ii];ii++)
if(str[i]==replace[ii])
str[i]=with[ii];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment