2 * Distributed under the terms of the GNU GPL version 2.
5 #include <linux/module.h>
6 #include <linux/string.h>
8 #ifndef __HAVE_ARCH_STRCSPN
10 * strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject
11 * @s: The string to be searched
12 * @reject: The string to avoid
14 size_t strcspn(const char *s, const char *reject)
20 for (p = s; *p != '\0'; ++p) {
21 for (r = reject; *r != '\0'; ++r) {
29 EXPORT_SYMBOL(strcspn);