Lstrxfrm

Transforms a specified number of characters from one string to another string.

Library:LibC
Classification:Other
Service:Characters and Strings

Syntax

  #include <string.h> 
   
  size_t Lstrxfrm (
     char         *dst,   
     const char   *src,   
     size_t        n);
  

Parameters

dst

(OUT) Points to the array into which to place the transformed characters.

src

(IN) Points to the string to be transformed.

n

(IN) Specifies the number of characters to transform.

Return Values

If successful, returns the length of the transformed string (not including the null-terminating character). If returned length is n or greater, the contents of the array pointed to by dst are indeterminate.

Remarks

The Lstrxfrm function is a double-byte character interface. It transforms, for no more than n characters, the string pointed to by src to the buffer pointed to by dst. The transformation uses the collating sequence selected by setlocale so that two transformed strings compare identically (using Lstrncmp) to a comparison of the original two strings using Lstrcoll.

To determine how much room is needed to store the results of the function, set dst to NULL and n to 0 and call the function with src specifying the string to convert.

See Also

Lstrcoll