1strxfrm(3)                 Library Functions Manual                 strxfrm(3)
2
3
4

NAME

6       strxfrm - string transformation
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <string.h>
13
14       size_t strxfrm(char dest[restrict .n], const char src[restrict .n],
15                      size_t n);
16

DESCRIPTION

18       The  strxfrm() function transforms the src string into a form such that
19       the result of strcmp(3) on two strings that have been transformed  with
20       strxfrm()  is  the  same as the result of strcoll(3) on the two strings
21       before their transformation.  The first  n  bytes  of  the  transformed
22       string  are  placed  in  dest.  The transformation is based on the pro‐
23       gram's current locale for category LC_COLLATE.  (See setlocale(3)).
24

RETURN VALUE

26       The strxfrm() function returns the number of bytes  required  to  store
27       the  transformed  string  in  dest  excluding the terminating null byte
28       ('\0').  If the value returned is n or more, the contents of  dest  are
29       indeterminate.
30

ATTRIBUTES

32       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
33       tributes(7).
34
35       ┌─────────────────────────────────────┬───────────────┬────────────────┐
36Interface                            Attribute     Value          
37       ├─────────────────────────────────────┼───────────────┼────────────────┤
38strxfrm()                            │ Thread safety │ MT-Safe locale │
39       └─────────────────────────────────────┴───────────────┴────────────────┘
40

STANDARDS

42       C11, POSIX.1-2008.
43

HISTORY

45       POSIX.1-2001, C89, SVr4, 4.3BSD.
46

SEE ALSO

48       memcmp(3),   setlocale(3),   strcasecmp(3),   strcmp(3),    strcoll(3),
49       string(3)
50
51
52
53Linux man-pages 6.05              2023-07-20                        strxfrm(3)
Impressum