Hi all, this is my UDF
When c contains the upper case character pointed by s, I cannot assign it back to s because the program ends.Code:void str_capitalize(char s[]) { char c; int up = 1; while (s) { if (up) { if (!isspace(*s)) { c = toupper(*s); *s = c; up = 0; } } else { if (isspace(*s)) up = 1; else *s = tolower(*s); } ++s; } }
Might someone please explain me why? What's wrong with that?
Thanks in advance.



LinkBack URL
About LinkBacks



