I am trying to change characters in a string. I have managed to do that. But I want to keep spaces, numbers and puntuations unchanged . How can i do that?
Printable View
I am trying to change characters in a string. I have managed to do that. But I want to keep spaces, numbers and puntuations unchanged . How can i do that?
Well, when you examine each character, a good place to start is with an 'if()' statement. IF it's something you don't want to change, skip to the next character.
In ctype.h: isalpha(), isdigit(), isalnum() etc Use these to test a single character.