Function checkUtf8ToUtf16LeOverflow [src]
Checks if calling utf8ToUtf16Le would overflow. Might fail if utf8 is not
valid UTF-8.
Prototype
pub fn checkUtf8ToUtf16LeOverflow(utf8: []const u8, utf16le: []const u16) error{InvalidUtf8}!bool
Parameters
utf8: []const u8
utf16le: []const u16
Possible Errors
Source
pub fn checkUtf8ToUtf16LeOverflow(utf8: []const u8, utf16le: []const u16) error{InvalidUtf8}!bool {
return checkUtf8ToUtf16LeOverflowImpl(utf8, utf16le, .cannot_encode_surrogate_half);
}