So I have this example string in C which contains the following:
char text_string[100] = "A panqueca americana é provavelmente o caféç da manhã mais famoso dos Estados Unidos.";
I need to find and replace special characters such as "ç" and turn them into their non-accent counterpart (for instance, "ç" would become "c").
I'm really struggling with this, searched around but couldn't find anything to help with this question. I tried usint strchr to compare the individual chars of the text to the special characters like I'll show below but it didn't work.
char transform_text(char *text_string){
for(int i=0; i<100; i++){
if(strchr("ç", text_string[i]) != NULL )
text_string[i]='c';
}
Any suggestions? Thank you in advance.