diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-03-02 23:49:35 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-03-02 23:49:35 +0100 |
| commit | f1c9b198bba52d19a840efc7a77a9752d711ee57 (patch) | |
| tree | 90ec58fa6e6ab849ae86ac39215588698feaa972 /src/flstring.c | |
| parent | 4ccadff4b9120cba114da964fd0e79c762a6fd3d (diff) | |
Promote fl_strlcpy to <FL/fl_string_functions.h>
Diffstat (limited to 'src/flstring.c')
| -rw-r--r-- | src/flstring.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/flstring.c b/src/flstring.c index 6298a6d70..fab89feed 100644 --- a/src/flstring.c +++ b/src/flstring.c @@ -56,38 +56,6 @@ fl_strlcat(char *dst, /* O - Destination string */ return (dstlen + srclen); } - -/* - * 'fl_strlcpy()' - Safely copy two strings. - */ - -size_t /* O - Length of string */ -fl_strlcpy(char *dst, /* O - Destination string */ - const char *src, /* I - Source string */ - size_t size) { /* I - Size of destination string buffer */ - size_t srclen; /* Length of source string */ - - - /* - * Figure out how much room is needed... - */ - - size --; - - srclen = strlen(src); - - /* - * Copy the appropriate amount... - */ - - if (srclen > size) srclen = size; - - memcpy(dst, src, srclen); - dst[srclen] = '\0'; - - return (srclen); -} - #define C_RANGE(c,l,r) ( (c) >= (l) && (c) <= (r) ) /** |
