2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\"
|
|
|
|
.\" References consulted:
|
|
|
|
.\" Linux libc source code
|
|
|
|
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
|
|
|
|
.\" 386BSD man pages
|
|
|
|
.\" Modified Sun Jul 25 10:54:31 1993, Rik Faith (faith@cs.unc.edu)
|
add_key.2, keyctl.2, request_key.2, stime.2, time.2, ctime.3, difftime.3, ftime.3, getspnam.3, mq_receive.3, mq_send.3, rtime.3, sem_wait.3, string.3, timeradd.3, tzset.3, rtc.4, core.5, icmp.7, time.7, zic.8: Updated .TH timestamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-02-25 09:43:57 +00:00
|
|
|
.TH STRING 3 2010-02-25 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
2009-12-05 06:40:42 +00:00
|
|
|
stpcpy, strcasecmp, strcat, strchr, strcmp, strcoll, strcpy, strcspn,
|
2004-11-03 13:51:07 +00:00
|
|
|
strdup, strfry, strlen, strncat, strncmp, strncpy, strncasecmp, strpbrk,
|
|
|
|
strrchr, strsep, strspn, strstr, strtok, strxfrm, index, rindex
|
|
|
|
\- string operations
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
|
|
|
.B #include <strings.h>
|
|
|
|
.sp
|
|
|
|
.BI "int strcasecmp(const char *" s1 ", const char *" s2 );
|
|
|
|
.sp
|
|
|
|
.BI "int strncasecmp(const char *" s1 ", const char *" s2 ", size_t " n );
|
|
|
|
.sp
|
|
|
|
.BI "char *index(const char *" s ", int " c );
|
|
|
|
.sp
|
|
|
|
.BI "char *rindex(const char *" s ", int " c );
|
|
|
|
.sp
|
|
|
|
.B #include <string.h>
|
|
|
|
.sp
|
2009-12-05 06:40:42 +00:00
|
|
|
.BI "char *stpcpy(char *" dest ", const char *" src );
|
|
|
|
.sp
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "char *strcat(char *" dest ", const char *" src );
|
|
|
|
.sp
|
|
|
|
.BI "char *strchr(const char *" s ", int " c );
|
|
|
|
.sp
|
|
|
|
.BI "int strcmp(const char *" s1 ", const char *" s2 );
|
|
|
|
.sp
|
|
|
|
.BI "int strcoll(const char *" s1 ", const char *" s2 );
|
|
|
|
.sp
|
|
|
|
.BI "char *strcpy(char *" dest ", const char *" src );
|
|
|
|
.sp
|
|
|
|
.BI "size_t strcspn(const char *" s ", const char *" reject );
|
|
|
|
.sp
|
|
|
|
.BI "char *strdup(const char *" s );
|
|
|
|
.sp
|
|
|
|
.BI "char *strfry(char *" string );
|
|
|
|
.sp
|
|
|
|
.BI "size_t strlen(const char *" s );
|
|
|
|
.sp
|
|
|
|
.BI "char *strncat(char *" dest ", const char *" src ", size_t " n );
|
|
|
|
.sp
|
|
|
|
.BI "int strncmp(const char *" s1 ", const char *" s2 ", size_t " n );
|
|
|
|
.sp
|
|
|
|
.BI "char *strncpy(char *" dest ", const char *" src ", size_t " n );
|
|
|
|
.sp
|
|
|
|
.BI "char *strpbrk(const char *" s ", const char *" accept );
|
|
|
|
.sp
|
|
|
|
.BI "char *strrchr(const char *" s ", int " c );
|
|
|
|
.sp
|
|
|
|
.BI "char *strsep(char **" stringp ", const char *" delim );
|
|
|
|
.sp
|
|
|
|
.BI "size_t strspn(const char *" s ", const char *" accept );
|
|
|
|
.sp
|
|
|
|
.BI "char *strstr(const char *" haystack ", const char *" needle );
|
|
|
|
.sp
|
|
|
|
.BI "char *strtok(char *" s ", const char *" delim );
|
|
|
|
.sp
|
|
|
|
.BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n );
|
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
2006-01-13 02:09:44 +00:00
|
|
|
The string functions perform string operations on null-terminated
|
2007-04-12 22:42:49 +00:00
|
|
|
strings.
|
|
|
|
See the individual man pages for descriptions of each function.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR index (3),
|
|
|
|
.BR rindex (3),
|
2009-12-05 06:40:42 +00:00
|
|
|
.BR stpcpy (3),
|
clock_nanosleep.2, getpriority.2, kexec_load.2, nanosleep.2, nice.2, sched_setaffinity.2, timer_create.2, timer_delete.2, timer_settime.2, utime.2, btowc.3, futimes.3, log.3, pthread_attr_setguardsize.3, pthread_kill_other_threads_np.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_tryjoin_np.3, strcoll.3, strcpy.3, string.3, strxfrm.3, networks.5, aio.7, sigevent.7, udplite.7: SEE ALSO: Place entries in correct order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-11-01 05:34:26 +00:00
|
|
|
.BR strcasecmp (3),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR strcat (3),
|
|
|
|
.BR strchr (3),
|
|
|
|
.BR strcmp (3),
|
|
|
|
.BR strcoll (3),
|
|
|
|
.BR strcpy (3),
|
|
|
|
.BR strcspn (3),
|
|
|
|
.BR strdup (3),
|
|
|
|
.BR strfry (3),
|
|
|
|
.BR strlen (3),
|
|
|
|
.BR strncasecmp (3),
|
|
|
|
.BR strncat (3),
|
|
|
|
.BR strncmp (3),
|
|
|
|
.BR strncpy (3),
|
|
|
|
.BR strpbrk (3),
|
|
|
|
.BR strrchr (3),
|
|
|
|
.BR strsep (3),
|
|
|
|
.BR strspn (3),
|
|
|
|
.BR strstr (3),
|
|
|
|
.BR strtok (3),
|
|
|
|
.BR strxfrm (3)
|