From 9632f8b465d72c3405fb0d575fab4b953300b88a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 26 Apr 2024 17:40:54 +0200 Subject: utf8: export utf8_char_console_width() --- src/basic/utf8.c | 2 +- src/basic/utf8.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/basic') diff --git a/src/basic/utf8.c b/src/basic/utf8.c index 4d1b31f26d..68b7c31aec 100644 --- a/src/basic/utf8.c +++ b/src/basic/utf8.c @@ -179,7 +179,7 @@ char *utf8_escape_invalid(const char *str) { return str_realloc(p); } -static int utf8_char_console_width(const char *str) { +int utf8_char_console_width(const char *str) { char32_t c; int r; diff --git a/src/basic/utf8.h b/src/basic/utf8.h index 301c50cc2f..de45fcba5b 100644 --- a/src/basic/utf8.h +++ b/src/basic/utf8.h @@ -59,4 +59,5 @@ static inline char32_t utf16_surrogate_pair_to_unichar(char16_t lead, char16_t t } size_t utf8_n_codepoints(const char *str); +int utf8_char_console_width(const char *str); size_t utf8_console_width(const char *str); -- cgit v1.2.3