utf8: automatically determine length of string if SIZE_MAX is specified
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Aug 2023 11:15:52 +0000 (13:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 Aug 2023 11:19:12 +0000 (13:19 +0200)
commitba091282e5ed2f77cbebc3328faa1da362fdab4d
tree9a037948331476378a73f28f5a823455a4ce1ba1
parentb56ee692334231f0312c2fd142b9f2a84da14ac9
utf8: automatically determine length of string if SIZE_MAX is specified

Let's make utf8_to_utf16() and utf16_to_utf8() a bit nicer to use by
adding shortcuts for common cases.

This is particularly relevant for utf16_to_utf8() since the
multiplication with 2 is easy to forget.
src/basic/efivars.c
src/basic/utf8.c
src/boot/bootctl-set-efivar.c
src/boot/efi/test-bcd.c
src/shared/gpt.c
src/test/test-utf8.c