- Timestamp:
- Jul 24, 2009, 12:59:23 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 5603d72
- Parents:
- 41c9a96
- git-author:
- Anders Kaseorg <andersk@mit.edu> (07/24/09 00:56:26)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (07/24/09 00:59:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
text.c
rd43edd2 r64c9165 225 225 } 226 226 227 /* exactly like strstr but case insensitive */228 char *stristr(char *a, char *b)229 {230 char *x, *y;231 char *ret = NULL;232 if ((x = g_utf8_casefold(a, -1)) != NULL) {233 if ((y = g_utf8_casefold(b, -1)) != NULL) {234 ret = strstr(x, y);235 if (ret != NULL) {236 ret = ret - x + a;237 }238 g_free(y);239 }240 g_free(x);241 }242 return(ret);243 }244 245 227 /* return 1 if a string is only whitespace, otherwise 0 */ 246 228 int only_whitespace(char *s)
Note: See TracChangeset
for help on using the changeset viewer.