util/charset: Add utf16_len_n()
commita46746381b2bf7c336e4411430ecfc5fbb3cbb2a
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 8 Nov 2023 23:43:07 +0000 (9 12:43 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Nov 2023 22:07:36 +0000 (15 22:07 +0000)
tree0228e5c2744e6b6193f55d01503e000f5388db55
parent74a5a3b74e1388936307da9d06f4d1a816d7613f
util/charset: Add utf16_len_n()

This function returns the length in bytes — at most ‘n’ — of a UTF‐16
string excluding the null terminator.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/charset/charset.h
lib/util/charset/util_unistr.c