diff --git a/src/core/utf8.hpp b/src/core/utf8.hpp index db1354ef24..26e6305ba9 100644 --- a/src/core/utf8.hpp +++ b/src/core/utf8.hpp @@ -13,11 +13,17 @@ #define UTF8_HPP #include -#include "../string_func.h" +#include "bitmath_func.hpp" [[nodiscard]] std::pair EncodeUtf8(char32_t c); [[nodiscard]] std::pair DecodeUtf8(std::string_view buf); +/* Check if the given character is part of a UTF8 sequence */ +inline bool IsUtf8Part(char c) +{ + return GB(c, 6, 2) == 2; +} + /** * Constant span of UTF-8 encoded data. */ diff --git a/src/string_func.h b/src/string_func.h index c7e8910542..9fa5636204 100644 --- a/src/string_func.h +++ b/src/string_func.h @@ -72,13 +72,6 @@ inline bool StrEmpty(const char *s) bool IsValidChar(char32_t key, CharSetFilter afilter); - -/* Check if the given character is part of a UTF8 sequence */ -inline bool IsUtf8Part(char c) -{ - return GB(c, 6, 2) == 2; -} - size_t Utf8StringLength(std::string_view str); /**