Function checkWtf8ToWtf16LeOverflow [src]

Checks if calling utf8ToUtf16Le would overflow. Might fail if wtf8 is not valid WTF-8.

Prototype

pub fn checkWtf8ToWtf16LeOverflow(wtf8: []const u8, wtf16le: []const u16) error{InvalidWtf8}!bool

Parameters

wtf8: []const u8wtf16le: []const u16

Possible Errors

InvalidWtf8

Source

pub fn checkWtf8ToWtf16LeOverflow(wtf8: []const u8, wtf16le: []const u16) error{InvalidWtf8}!bool { return checkUtf8ToUtf16LeOverflowImpl(wtf8, wtf16le, .can_encode_surrogate_half); }