strxfrm.3 (954B)
1 .TH strxfrm 3 2 .SH NAME 3 strxfrm - transform a string for locale-aware comparison 4 .SH SYNOPSIS 5 #include <string.h> 6 7 size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n) 8 .SH DESCRIPTION 9 The 10 .BR strxfrm () 11 function transforms the string at 12 .I s2 13 and writes the result into the array at 14 .IR s1 . 15 The transformation is defined such that applying 16 .B strcmp 17 to two transformed strings yields the same ordering as applying 18 .B strcoll 19 to the corresponding original strings. 20 .PP 21 At most 22 .I n 23 characters, including the terminating null byte, 24 are written to 25 .IR s1 . 26 When 27 .I n 28 is zero, 29 .I s1 30 may be a null pointer. 31 .PP 32 Overlapping source and destination regions produce undefined behavior. 33 .SH RETURN VALUE 34 The 35 .BR strxfrm () 36 function returns the length of the transformed string, 37 not counting the terminating null byte. 38 If the returned value is 39 .I n 40 or greater, the content of 41 .I s1 42 is indeterminate. 43 .SH STANDARDS 44 ISO/IEC 9899:1999 Section 7.21.4.5