1 #ifndef _LINUX_STRING_H_
2 #define _LINUX_STRING_H_
4 #include <linux/types.h> /* for size_t */
5 #include <linux/stddef.h> /* for NULL */
11 extern char * ___strtok;
12 extern char * strpbrk(const char *,const char *);
13 extern char * strtok(char *,const char *);
14 extern char * strsep(char **,const char *);
15 extern __kernel_size_t strspn(const char *,const char *);
19 * Include machine specific inline routines
21 #include <asm/string.h>
23 #ifndef __HAVE_ARCH_STRCPY
24 extern char * strcpy(char *,const char *);
26 #ifndef __HAVE_ARCH_STRNCPY
27 extern char * strncpy(char *,const char *, __kernel_size_t);
29 #ifndef __HAVE_ARCH_STRLCPY
30 size_t strlcpy(char *, const char *, size_t);
32 #ifndef __HAVE_ARCH_STRCAT
33 extern char * strcat(char *, const char *);
35 #ifndef __HAVE_ARCH_STRNCAT
36 extern char * strncat(char *, const char *, __kernel_size_t);
38 #ifndef __HAVE_ARCH_STRCMP
39 extern int strcmp(const char *,const char *);
41 #ifndef __HAVE_ARCH_STRNCMP
42 extern int strncmp(const char *,const char *,__kernel_size_t);
44 #ifndef __HAVE_ARCH_STRCASECMP
45 int strcasecmp(const char *s1, const char *s2);
47 #ifndef __HAVE_ARCH_STRNCASECMP
48 extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
50 #ifndef __HAVE_ARCH_STRCHR
51 extern char * strchr(const char *,int);
55 * strchrnul() - return position of a character in the string, or end of string
57 * The strchrnul() function is like strchr() except that if c is not found
58 * in s, then it returns a pointer to the nul byte at the end of s, rather than
60 * @s: string to search
61 * @c: character to search for
62 * @return position of @c in @s, or end of @s if not found
64 const char *strchrnul(const char *s, int c);
66 #ifndef __HAVE_ARCH_STRRCHR
67 extern char * strrchr(const char *,int);
69 #include <linux/linux_string.h>
70 #ifndef __HAVE_ARCH_STRSTR
71 extern char * strstr(const char *,const char *);
73 #ifndef __HAVE_ARCH_STRLEN
74 extern __kernel_size_t strlen(const char *);
76 #ifndef __HAVE_ARCH_STRNLEN
77 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
80 #ifndef __HAVE_ARCH_STRCSPN
82 * strcspn() - find span of string without given characters
84 * Calculates the length of the initial segment of @s which consists entirely
85 * of bsytes not in reject.
87 * @s: string to search
88 * @reject: strings which cause the search to halt
89 * @return number of characters at the start of @s which are not in @reject
91 size_t strcspn(const char *s, const char *reject);
94 #ifndef __HAVE_ARCH_STRDUP
95 extern char * strdup(const char *);
97 #ifndef __HAVE_ARCH_STRSWAB
98 extern char * strswab(const char *);
101 #ifndef __HAVE_ARCH_MEMSET
102 extern void * memset(void *,int,__kernel_size_t);
104 #ifndef __HAVE_ARCH_MEMCPY
105 extern void * memcpy(void *,const void *,__kernel_size_t);
107 #ifndef __HAVE_ARCH_MEMMOVE
108 extern void * memmove(void *,const void *,__kernel_size_t);
110 #ifndef __HAVE_ARCH_MEMSCAN
111 extern void * memscan(void *,int,__kernel_size_t);
113 #ifndef __HAVE_ARCH_MEMCMP
114 extern int memcmp(const void *,const void *,__kernel_size_t);
116 #ifndef __HAVE_ARCH_MEMCHR
117 extern void * memchr(const void *,int,__kernel_size_t);
119 #ifndef __HAVE_ARCH_MEMCHR_INV
120 void *memchr_inv(const void *, int, size_t);
123 unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
124 unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
130 #endif /* _LINUX_STRING_H_ */