From 106a59586aeba3fb1a0883e2fdaa51753fdbb68b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 21 Apr 2024 19:53:14 +0200 Subject: Rename u8glen() to u8gcnt() --- lib/unicode/string/u8gcnt.c | 10 ++++++++++ lib/unicode/string/u8glen.c | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 lib/unicode/string/u8gcnt.c delete mode 100644 lib/unicode/string/u8glen.c (limited to 'lib/unicode') diff --git a/lib/unicode/string/u8gcnt.c b/lib/unicode/string/u8gcnt.c new file mode 100644 index 0000000..81a0f97 --- /dev/null +++ b/lib/unicode/string/u8gcnt.c @@ -0,0 +1,10 @@ +#include "unicode/string.h" + +size_t +u8gcnt(const char8_t *s, size_t n) +{ + size_t m = 0; + while (u8gnext(nullptr, &s, &n)) + m++; + return m; +} diff --git a/lib/unicode/string/u8glen.c b/lib/unicode/string/u8glen.c deleted file mode 100644 index 394a62d..0000000 --- a/lib/unicode/string/u8glen.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "unicode/string.h" - -size_t -u8glen(const char8_t *s, size_t n) -{ - size_t m = 0; - while (u8gnext(nullptr, &s, &n)) - m++; - return m; -} -- cgit v1.2.3