diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 07:24:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 07:24:06 +0300 |
commit | fb330dd11098b9df379d84fe181ce7966d89674c (patch) | |
tree | 0bc05acf9ed0481d886898632274af64628704a1 /source | |
parent | 8931c4b18d5e15366c755346f0c982698f661e6f (diff) |
Cleanup: remove unused BLI_strncat_utf8
Behaves differently to strncat,
BLI_strncpy_utf8_rlen can be used for a similar purpose.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/BLI_string_utf8.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string_utf8.c | 16 |
2 files changed, 0 insertions, 18 deletions
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h index 1db4cdfecd6..8d986d45a17 100644 --- a/source/blender/blenlib/BLI_string_utf8.h +++ b/source/blender/blenlib/BLI_string_utf8.h @@ -32,8 +32,6 @@ char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t ATTR_NONNULL(); size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(); -char *BLI_strncat_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) - ATTR_NONNULL(); ptrdiff_t BLI_utf8_invalid_byte(const char *str, size_t length) ATTR_NONNULL(); int BLI_utf8_invalid_strip(char *str, size_t length) ATTR_NONNULL(); diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index 027afba1f5e..bf08ad6975b 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -288,22 +288,6 @@ size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, s return (size_t)(dst - r_dst); } -char *BLI_strncat_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) -{ - while (*dst && maxncpy > 0) { - dst++; - maxncpy--; - } - -#ifdef DEBUG_STRSIZE - memset(dst, 0xff, sizeof(*dst) * maxncpy); -#endif - - BLI_STR_UTF8_CPY(dst, src, maxncpy); - - return dst; -} - #undef BLI_STR_UTF8_CPY /* --------------------------------------------------------------------------*/ |