The new name indicates that — contrary to functions such as strnlen() —
the length may include the terminator.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
return the number of bytes occupied by a buffer in CH_UTF16 format
the result includes the null termination
**/
-size_t utf16_len(const void *buf);
+size_t utf16_null_terminated_len(const void *buf);
/**
return the number of bytes occupied by a buffer in CH_UTF16 format
return the number of bytes occupied by a buffer in CH_UTF16 format
the result includes the null termination
**/
-size_t utf16_len(const void *buf)
+size_t utf16_null_terminated_len(const void *buf)
{
size_t len;
if (flags & STR_TERMINATE) {
if (src_len == (size_t)-1) {
- src_len = utf16_len(src);
+ src_len = utf16_null_terminated_len(src);
} else {
src_len = utf16_null_terminated_len_n(src, src_len);
}