summaryrefslogtreecommitdiffstats
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-04-26 17:40:54 +0200
committerLennart Poettering <lennart@poettering.net>2024-06-17 09:20:21 +0200
commit9632f8b465d72c3405fb0d575fab4b953300b88a (patch)
treec8a80dbaaf3a316fbc74b03cd8d95b4675726ebd /src/basic
parentMerge pull request #33363 from YHNdnzj/service-serialization-cleanup (diff)
downloadsystemd-9632f8b465d72c3405fb0d575fab4b953300b88a.tar.xz
systemd-9632f8b465d72c3405fb0d575fab4b953300b88a.zip
utf8: export utf8_char_console_width()
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/utf8.c2
-rw-r--r--src/basic/utf8.h1
2 files changed, 2 insertions, 1 deletions
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);