diff options
Diffstat (limited to 'common/eurephia_nullsafe.h')
-rw-r--r-- | common/eurephia_nullsafe.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/eurephia_nullsafe.h b/common/eurephia_nullsafe.h index 5f6b58c..22d50ed 100644 --- a/common/eurephia_nullsafe.h +++ b/common/eurephia_nullsafe.h @@ -59,6 +59,17 @@ /** + * Wrapper macro, which appends a string to a destination string without exceeding the size + * of the destination buffer. + * + * @param dest Pointer to the destination buffer + * @param src Pointer to the value being concatenated to the destination string. + * @param size Size of the destination buffer + */ +#define append_str(dest, src, size) strncat(dest, src, (size - strlen_nullsafe(dest))) + + +/** * strlen() wrapper. Returns the length of a string * * @param str Input string |