Older Newer
Wed, 19 Dec 2007 18:01:45 . . . . afh [fix typos, add info and links]


Changes by last author:

Added:
= strxfrm =

== Syntax ==

:int strxfrm(char * dest, const char * src, int n)

== Arguments ==

:dest

::The string to which the source string is to be copied.

:src

::The string which is to be copied to the destination string.

:n

::The maximum number of characters to copy to the destination string.

== Return ==

:The length of the transformed string, even if higher than n.

== Description ==

:Transforms the string src according to the current locale and copies up to the first n characters to dest. The string is transformed in such a way that the strcmp function may be used on the transformed strings to determine the correct collating sequence according to the locale-specific collating conventions set by (setlocale)?.

:Returns the number of characters needed to store the transformed string, even if greater than n.

:If n is zero, no part of the string is copied to dest (which now may also be NULL). Use this to find out the size required for dest.

=== Also see ===

:strcmp, (setlocale)?