|
|
| version 1.1.1.1, 2013/01/17 10:05:35 | version 1.2, 2013/03/07 16:24:32 |
|---|---|
| Line 383 str_Unquot(char * __restrict psLine) | Line 383 str_Unquot(char * __restrict psLine) |
| return 0; | return 0; |
| } | } |
| /* | |
| * str_Upper() - Convert all lower characters to upper | |
| * | |
| * @psLine = Text string | |
| * return: 0 nothing to do; !=0 converted chars | |
| */ | |
| inline int | |
| str_Upper(char * __restrict psLine) | |
| { | |
| char *s; | |
| register int cx = 0; | |
| if (!psLine || !*psLine) | |
| return 0; | |
| for (s = psLine; *s; s++) | |
| if (islower(*s)) { | |
| *s = toupper(*s); | |
| cx++; | |
| } | |
| return cx; | |
| } | |
| /* | |
| * str_Lower() - Convert all upper characters to lower | |
| * | |
| * @psLine = Text string | |
| * return: 0 nothing to do; !=0 converted chars | |
| */ | |
| inline int | |
| str_Lower(char * __restrict psLine) | |
| { | |
| char *s; | |
| register int cx = 0; | |
| if (!psLine || !*psLine) | |
| return 0; | |
| for (s = psLine; *s; s++) | |
| if (isupper(*s)) { | |
| *s = tolower(*s); | |
| cx++; | |
| } | |
| return cx; | |
| } |