| 160 | } |
| 161 | |
| 162 | void gmt_strrepc (char *string, int c, int r) { |
| 163 | /* Replaces all occurrences of c in the string with r */ |
| 164 | assert (string != NULL); /* NULL pointer */ |
| 165 | do { |
| 166 | if (*string == c) |
| 167 | *string = (char)r; |
| 168 | } while (*(++string)); /* repeat until \0 reached */ |
| 169 | } |
| 170 | |
| 171 | size_t gmt_strlcmp (char *str1, char *str2) { |
| 172 | /* Compares str1 with str2 but only until str1 reaches the |
no outgoing calls
no test coverage detected