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:41:28 1993 by Rik Faith (faith@cs.unc.edu)
|
futimesat.2, mount.2, confstr.3, iconv.3, makedev.3, malloc.3, strcasecmp.3, strcat.3, strcmp.3, strcpy.3, strdup.3, strftime.3, strnlen.3, strpbrk.3, strspn.3, strtok.3, strxfrm.3, sk98lin.4, icmp.7, ipv6.7, packet.7, raw.7, rtnetlink.7, unix.7, x25.7, ldconfig.8, nscd.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-05-10 20:09:28 +00:00
|
|
|
.TH STRXFRM 3 2012-05-10 "GNU" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
strxfrm \- string transformation
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
|
|
|
.B #include <string.h>
|
|
|
|
.sp
|
|
|
|
.BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n );
|
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
2007-05-12 09:06:04 +00:00
|
|
|
The
|
|
|
|
.BR strxfrm ()
|
|
|
|
function transforms the \fIsrc\fP string into a
|
|
|
|
form such that the result of
|
|
|
|
.BR strcmp (3)
|
|
|
|
on two strings that have
|
|
|
|
been transformed with
|
|
|
|
.BR strxfrm ()
|
|
|
|
is the same as the result of
|
|
|
|
.BR strcoll (3)
|
|
|
|
on the two strings before their transformation.
|
confstr.3, strcasecmp.3, strcat.3, strcmp.3, strcpy.3, strdup.3, strftime.3, strlen.3, strnlen.3, strpbrk.3, strspn.3, strtok.3, strxfrm.3: Clarify that these functions operate on bytes, not (wide) characters
Change 'character(s)' to 'byte(s)' to make clear that these
functions operate on bytes, not wide / UTF8 characters.
(POSIX uses 'byte(s)' similarly, to make this point.)
Reported-by: Andries E. Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-05-04 04:15:02 +00:00
|
|
|
The first \fIn\fP bytes of the transformed string are placed in
|
2007-04-12 22:42:49 +00:00
|
|
|
\fIdest\fP.
|
|
|
|
The transformation is based on the program's current
|
2007-06-22 20:40:07 +00:00
|
|
|
locale for category \fBLC_COLLATE\fP. (See
|
2007-05-12 09:06:04 +00:00
|
|
|
.BR setlocale (3)).
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "RETURN VALUE"
|
2007-05-12 09:06:04 +00:00
|
|
|
The
|
|
|
|
.BR strxfrm ()
|
|
|
|
function returns the number of bytes required to
|
2007-07-28 06:37:52 +00:00
|
|
|
store the transformed string in \fIdest\fP excluding the
|
gets.3, mbtowc.3, printf.3, puts.3, scanf.3, stpcpy.3, stpncpy.3, strcat.3, strlen.3, strnlen.3, strsep.3, strstr.3, strxfrm.3, utmp.5: Global fix: consistent use of "null byte"
Bring more consistency to the discussion of
"[terminating] null byte"
by writing (at least in the initial use in a page)
"[terminating] null byte ('\0')".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2011-09-28 04:16:17 +00:00
|
|
|
terminating null byte (\(aq\\0\(aq).
|
2007-04-12 22:42:49 +00:00
|
|
|
If the value returned is \fIn\fP or more, the
|
2004-11-03 13:51:07 +00:00
|
|
|
contents of \fIdest\fP are indeterminate.
|
|
|
|
.SH "CONFORMING TO"
|
2008-07-15 13:39:17 +00:00
|
|
|
SVr4, 4.3BSD, C89, C99.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NOTES
|
2007-05-12 09:06:04 +00:00
|
|
|
In the \fI"POSIX"\fP or \fI"C"\fP locales
|
|
|
|
.BR strxfrm ()
|
|
|
|
is equivalent to
|
|
|
|
copying the string with
|
|
|
|
.BR strncpy (3).
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR bcmp (3),
|
|
|
|
.BR memcmp (3),
|
|
|
|
.BR setlocale (3),
|
|
|
|
.BR strcasecmp (3),
|
|
|
|
.BR strcmp (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 strcoll (3),
|
|
|
|
.BR string (3)
|