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.

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

strncat Appends characters to a string.<br />

#include <br />

char *strncat(<br />

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

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

size_t n /* source length */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This function appends up to n characters from one string (s2) to the end of another<br />

string (s1). The first character in the source string overwrites the terminating null<br />

character in the destination string. A null character and characters that follow it in<br />

the source string are not appended.<br />

The resulting string is always null terminated. If the length of the source string is<br />

greater than the number of characters specified in the call, only the specified<br />

number of characters (not including the null termination character) is appended.<br />

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

s1 Points to the destination string.<br />

s2 Points to the source string.<br />

n Specifies the number of characters to append.<br />

This function returns the value of s1.<br />

None.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 3-155<br />

3

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

Saved successfully!

Ooh no, something went wrong!