#include <string.h>
#include "common/gru_base.h"
#include "common/gru_portable.h"
Go to the source code of this file.
◆ strlcat()
Poor man's implementation of strlcat.
- Parameters
-
dst | destination buffer |
src | source buffer |
size | amount of bytes to copy |
- Returns
- The total length of the string they tried to create
◆ strlcpy()
Very simple alternatives to some safer string variables.
Do not use unless libbsd or other more mature alternatives are not available Poor man's implementation of strlcpy (works just like strncpy, but copies size - 1)
- Parameters
-
dst | destination buffer |
src | source buffer |
size | amount of bytes to copy |
- Returns
- The amount of bytes copied
◆ strndup()
gru_export char* strndup |
( |
const char * |
source, |
|
|
size_t |
limit |
|
) |
| |
Poor man's implementation of strndup (duplicate a string)
- Parameters
-
source | source string |
limit | maximum number of bytes to copy |