API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

FUNCTION: STRLCPY()

Brew Release
Brew MP 1.0.2
See Also
STRCPY() STRNCPY() Helper Functions
Description
Copies a string into a destination buffer and guarantees that it is NULL-terminated.
Params
dst
[]:
Destination string to copy into.
src
[]:
Source string to copy from.
nSize
[]:
Size of the destination buffer in bytes.
Prototype
  •    size_t STRLCPY(char * dst, const char * src, size_t nSize);
    
Return
  • Length of the full string that STRLCPY() copied, if successful. The value (size_t - 1) for an error.
Side Effect
  • None
Comments
To see if truncation occurred, check the return value against the length of the destination buffer.