strxfrm(3)

strxfrm3

String transform

Usage

#include <string.h>

size_t strxfrm(size_t size; char dest[restrict size], const char src[restrict size], size_t size);

Library

Standard C library (libc, -lc)

Overview

The strxfrm() function transforms the src string into a form such that the result of strcmp(3) on two strings that have been transformed with strxfrm() is the same as the result of strcoll(3) on the two strings before their transformation. The first size bytes of the transformed string are placed in dest. The transformation is based on the program's current locale for category LC_COLLATE. (See setlocale(3)).

Return value

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

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
strxfrm()Thread safetyMT-Safe locale

Releases

19 releases since Debian 1.1 (Buzz); the text changed 14 times.

  1. 1.1–1.3
  2. 2.0–2.2
  3. 3.0
  4. 3.1
  5. 4.0
  6. 5.0
  7. 6.0
  8. 7
  9. 8
  10. 9
  11. 10
  12. 11
  13. 12
  14. 13
  15. Arch

Standards

C11, POSIX.1-2008.

History

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

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.