diff options
Diffstat (limited to '')
-rw-r--r-- | src/wchar/wcsspn.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/wchar/wcsspn.c b/src/wchar/wcsspn.c index e4a1190..4a023d5 100644 --- a/src/wchar/wcsspn.c +++ b/src/wchar/wcsspn.c @@ -41,47 +41,3 @@ size_t wcsspn(const wchar_t* string, const wchar_t* skipset) return (size_t)(s - 1 - string); } - -/** - * Returns length of the initial substring - * that consists entirely of the complement - * of a set of specified wide characters. - * - * @param string The string. - * @param stopset Characters disallowed in the substring. - * @return The length of the substring. - */ -size_t wcscspn(const wchar_t* string, const wchar_t* stopset) -{ - size_t i, end = wcslen(string); - wchar_t* s; - wchar_t c; - while ((c = *stopset++)) - for (i = 0, s = string; *s && (i < end); i++, s++) - if (*s == c) - { - end = (size_t)(s - string); - break; - } - return end; -} - - -/** - * This function works like `strcspn`, - * except it returns the pointer to the - * location of the first found non-matching - * wide character. - * - * @param string The string. - * @param stopset Bytes disallowed in the substring. - * @return A pointer to the first occurrence in - * `string` of a character found in `stopset`. - * `NULL` is returned if none is found. - */ -wchar_t* (wcspbrk)(const wchar_t* string, const wchar_t* stopset) -{ - string += wcscspn(string, stopset); - return *string ? string : NULL; -} - |