5 * Copyright (C) 1991, 1992 Linus Torvalds
8 #include <linux/types.h>
9 #include <linux/string.h>
11 #ifndef __HAVE_ARCH_STRSTR
13 * strstr - Find the first substring in a %NUL terminated string
14 * @s1: The string to be searched
15 * @s2: The string to search for
17 char *strstr(const char *s1
, const char *s2
)
27 if (!memcmp(s1
, s2
, l2
))
35 #ifndef __HAVE_ARCH_STRNCMP
37 * strncmp - Compare two length-limited strings
40 * @count: The maximum number of bytes to compare
42 int strncmp(const char *cs
, const char *ct
, size_t count
)
50 return c1
< c2
? -1 : 1;