06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

strxfrm pREPC+ <strong>System</strong> <strong>Calls</strong><br />

strxfrm Transforms a string so that it can be used by the strcmp() function.<br />

#include <br />

size_t strxfrm (<br />

char *s1, /* destination string */<br />

const char *s2 /* source string */<br />

size_t n /* destination string length */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

The strxfrm() function transforms the string pointed to by s2 and places the<br />

resulting string into the array pointed to by s1. The transformation is such that if<br />

the strcmp() function is applied to two transformed strings, it returns a value<br />

greater than, equal to, or less than zero, corresponding to the result of the<br />

strcoll() function applied to the same two original strings. No more than n<br />

characters are placed into the resulting array pointed to by s1, including the<br />

terminating null character. If n is zero, s1 is permitted to be a null pointer. If<br />

copying takes place between objects that overlap, the behavior is undefined.<br />

The main use for this function is in foreign language environments that do not use<br />

the ASCII collating sequence.<br />

s1 Points to the array where strxfrm() places the resulting string.<br />

s2 Points to the string to be transformed.<br />

n Specifies the number of characters to be placed in s1.<br />

The strxfrm() function returns the length of the transformed string (not including<br />

the terminating null character.) If the value is n or more, the contents of the array<br />

pointed to by s1 are indeterminate.<br />

None.<br />

3-172 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!