Search string for specific character and replace it by another specific character.
lib_str.h/lib_str.c
CPU_CHAR *Str_Char_Replace (CPU_CHAR *pstr, CPU_CHAR char_srch, CPU_CHAR char_replace); |
pstr
Pointer to the string to search for the specified character.
char_srch
Character to search for in the string.
char_replace
Replacement character.
Pointer to string, if no errors;
Pointer to NULL
, otherwise.
None.
String buffer not modified.
String search terminates if string pointer points to or overlaps the NULL
address.
CPU_CHAR *pstr; pstr = Str_Char_Replace("HellY World!", 'Y', 'o'); |