udi_strcat, udi_strncat


String concatenation

SYNOPSIS

#include <udi.h>
char *udi_strcat (

	char *s1,

	const char *s2 );
 
char *udi_strncat (

	char *s1,

	const char *s2,

	udi_size_t n );
 

ARGUMENTS s1 is a pointer to the destination string.

s2 is a pointer to the source string.

n is the destination string maximum length (in bytes).

DESCRIPTION The udi_strcat and udi_strncat functions are used to append the contents of string s2 to the end of the existing string s1, overwriting the null-terminator character at the end of s1 and ending with a new null-terminator character. The strings must not overlap and the s1 string must have enough space for the result.

The udi_strncat form may be used to limit the size of the result: this function will stop copying bytes from s2 to s1 once the length of s1 has reached n-1 bytes; a null-terminator will be supplied as the n'th byte if the end of s2 has not been reached.

RETURN VALUES The udi_strcat and udi_strncat functions return a pointer to the resulting null-terminated string s1.


UDI Core Specification Contents