[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


strxfrm

Transform a locale-specific character array.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <string.h>
size_t strxfrm(char *dest, 
   const char *source, size_t n);
Parameters:

Parameters for this facility are:

dest  
char *  
The destination string  
source  
const char *  
The source to be transformed  
n  
size_t  
The maximum length to transform  

Remarks:

The strxfrm() function copies characters from the character array pointed to by source to the character array pointed to by dest, transforming each character to conform to the locale character set defined in locale.h.

The Metrowerks C implementation of strxfrm() copies a maximum of n characters from the character array pointed to by source to the character array pointed to by dest using the strncpy() function. It is included in the string library to conform to the ANSI C Standard Library specification.

Return:

strxfrm() returns the length of dest after it has received source.

See Also:

"Locale specification"

"strcpy"

Example of strxfrm() usage.:
#include <string.h>
#include <stdio.h>

int main(void)
{
	char d[50];
	static char s[] = "123456789ABCDEFG";
	size_t result;

	result = strxfrm(d, s, 30);

	printf("%d characters copied: %s\n", result, d);

	return 0;
}

Output:
16 characters copied: 123456789ABCDEFG


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000