summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strstr.3
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-10-10 02:17:35 +0000
committerache <ache@FreeBSD.org>2001-10-10 02:17:35 +0000
commitfc83bdab6643a27ed8919dabe328d8ffcffe86a6 (patch)
treeee0ad47683714580d8cf18a06e67aea3d7fcebcc /lib/libc/string/strstr.3
parentc7f5c400617e9ce84f07a7ca4a3e8d5825d84645 (diff)
downloadFreeBSD-src-fc83bdab6643a27ed8919dabe328d8ffcffe86a6.zip
FreeBSD-src-fc83bdab6643a27ed8919dabe328d8ffcffe86a6.tar.gz
Implement strcasestr() which many others (f.e. Linux) already have.
Diffstat (limited to 'lib/libc/string/strstr.3')
-rw-r--r--lib/libc/string/strstr.310
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3
index c8aca32..d71537d 100644
--- a/lib/libc/string/strstr.3
+++ b/lib/libc/string/strstr.3
@@ -41,7 +41,7 @@
.Dt STRSTR 3
.Os
.Sh NAME
-.Nm strstr , strnstr
+.Nm strstr , strcasestr , strnstr
.Nd locate a substring in a string
.Sh LIBRARY
.Lb libc
@@ -50,6 +50,8 @@
.Ft char *
.Fn strstr "const char *big" "const char *little"
.Ft char *
+.Fn strcasestr "const char *big" "const char *little"
+.Ft char *
.Fn strnstr "const char *big" "const char *little" "size_t len"
.Sh DESCRIPTION
The
@@ -61,6 +63,12 @@ in the null-terminated string
.Fa big .
.Pp
The
+.Fn strcasestr
+function is similar to
+.Fn strstr
+but ignores the case of both strings.
+.Pp
+The
.Fn strnstr
function
locates the first occurrence of the null-terminated string
OpenPOWER on IntegriCloud