/trunk/uspace/lib/libc/generic/string.c |
---|
593,10 → 593,12 |
{ |
wchar_t acc; |
size_t off = 0; |
size_t last = 0; |
while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) { |
if (acc == ch) |
return (str + off); |
return (str + last); |
last = off; |
} |
return NULL; |
613,14 → 615,15 |
{ |
wchar_t acc; |
size_t off = 0; |
char *res; |
res = NULL; |
size_t last = 0; |
char *res = NULL; |
while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) { |
if (acc == ch) |
res = (str + off); |
res = (str + last); |
last = off; |
} |
return res; |
} |