mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
lib: Introduce strnstr()
It differs strstr() in that it limits the length to be searched in the first string. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <4B4E8743.6030805@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
a3291c14ec
commit
d5f1fb5335
2 changed files with 30 additions and 2 deletions
|
@ -72,7 +72,10 @@ static inline __must_check char *strstrip(char *str)
|
|||
}
|
||||
|
||||
#ifndef __HAVE_ARCH_STRSTR
|
||||
extern char * strstr(const char *,const char *);
|
||||
extern char * strstr(const char *, const char *);
|
||||
#endif
|
||||
#ifndef __HAVE_ARCH_STRNSTR
|
||||
extern char * strnstr(const char *, const char *, size_t);
|
||||
#endif
|
||||
#ifndef __HAVE_ARCH_STRLEN
|
||||
extern __kernel_size_t strlen(const char *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue