strxfrm function(Transform Locale-Specific String) in C Language – example and detail

In the C Programming Language, the strxfrm feature transforms the object pointed to by using s2 placing the first n characters of the result in the object pointed to via s1 (including the null character).


The syntax for the strxfrm feature in the C Language is:

size_t strxfrm(char *s1, const char *s2, size_t n);

Parameters or Arguments

s1 A pointer to an array where the end result will be copied. s2 A pointer to the string that will be transformed. n The number of characters to be copied.


The strxfrm feature returns the size of the converted string. It can exceed n.

Required Header

In the C Language, the required header for the strxfrm feature is:

#include <string.h>

Applies To

In the C Language, the strxfrm function can be used in the following versions:

ANSI/ISO 9899-1990

See Also

Other C features that are noteworthy when dealing with the strxfrm function:

strcmp function strcoll function