All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups

Detailed Description

Standard C-string manipulation.

Function Documentation

char * strcat ( char *  dest,
const char *  src 
)

Concatenates the string in src to the end of the string pointed by dest and null terminates dest.

There should be no overlap of dest and src.

Parameters
destThe destination buffer with enough space for src beyond the null character
srcThe source C string
Returns
The destination buffer dest
int strcmp ( const char *  str1,
const char *  str2 
)

Compares the null terminated strings str1 and str2 to each other.

Parameters
str1The first C string to compare
str2The second C string to compare
Returns
The difference of the first differing pair of bytes or 0 if the strings are identical
char * strcpy ( char *  dest,
const char *  src 
)

Copies the string in src into dest and null terminates dest.

There should be no overlap of dest and src in memory.

Parameters
destThe destination buffer with enough space for src
srcThe source C string
Returns
The destination buffer dest
size_t strlen ( const char *  str)

Calculates the length of a null terminated string.

Parameters
strThe C string.
Returns
The length of the C string str.
char * strncat ( char *  dest,
const char *  src,
size_t  n 
)

Concatenates up to n bytes from the string in src to the end of the string pointed by dest and null terminates dest.

There should be no overlap of dest and src in memeory.

Parameters
destThe destination buffer with enough space for src beyond the null character
srcThe source string
nThe maximum number of bytes to copy
Returns
The destination buffer dest
int strncmp ( const char *  str1,
const char *  str2,
size_t  n 
)

Compares the null terminated strings str1 and str2 to each other for up to n bytes.

Comparison ends when a null is read or when n bytes are read, whichever happens first.

Parameters
str1The first C string to compare
str2The second C string to compare
nThe maximum number of bytes to compare
Returns
The difference of the first differing pair of bytes or the final pair of bytes read or 0 if the portions of the strings read are identical
char * strncpy ( char *  dest,
const char *  src,
size_t  n 
)

Copies up to n bytes from the string in src into dest and null terminates dest.

If dest is null terminated before n bytes have been written, null bytes will continue to be written until n bytes total were written. There should be no overlap of dest and src in memory.

Parameters
destThe destination buffer with enough space for n bytes
srcThe source string
nThe number of bytes to copy
Returns
The destination buffer dest