Skip to main content


strlcat — Size-bounded C string concatenation function


#include "util.h"

| size_t **strlcat** ( | dst, |   | |   | src, |   | |   | size); |   |

char * <var class="pdparam">dst</var>; const char * <var class="pdparam">src</var>; size_t <var class="pdparam">size</var>;



This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

Size-bounded C string concatenation function.

Copies as many characters from src as will fit in dst, given that dst has at least size bytes of storage space available. Note that size refers to the full size of the buffer, not just the free space. Guarantees to NUL-terminate dst if size > 0.



the string to copy from


the string to copy to


the size of dst (including the terminating NUL)

Return Values

Returns the length of src. If the return value >= size, there was insufficient space in dst and truncation took place.

Was this page helpful?