gutf8: Add a g_utf8_truncate_middle() function

Adds a helper to truncate UTF8 strings in the middle, allowing to make
them fit certain size constraints.

This function is modeled after similar functionality that has existed
since 2008 in nautilus and in eel before that.
This commit is contained in:
Peter Eisenmann
2023-05-21 13:16:51 +02:00
parent 4641b02ca2
commit cd3837174b
4 changed files with 124 additions and 0 deletions

View File

@@ -3131,6 +3131,7 @@ g_utf8_strchr
g_utf8_strrchr
g_utf8_strreverse
g_utf8_substring
g_utf8_truncate_middle
g_utf8_validate
g_utf8_validate_len
g_utf8_make_valid