![]() |
![]()
| ![]() |
![]()
NAMExt_strcat() - Concatenate strings without risk of buffer overflow LIBRARY#include <xtend/string.h> -lxtend SYNOPSISsize_t xt_strlcat(char *dest, const char *src, size_t dstsize) ARGUMENTSdest: Pointer to a character array of at least len dstsize, where the possibly modified string is stored. src: Point to a character array containing the string to compact dstsize: Length of the dest array DESCRIPTIONConcatenate string src to dest, truncating if necessary to avoid overflowing the destination array. RETURN VALUESThe combined lengths of the two strings. If the return value is larger than the dstsize, then truncation has occurred. EXAMPLES#define MAXLEN 127 char limited_str[MAXLEN + 1], SEE ALSOxt_strlcpy(3), xt_strlsqueeze(3)
|