convert method
String
convert(
- List<
int> input, [ - int start = 0,
- int? end,
- int replacementCodepoint = unicodeReplacementCharacterCodepoint,
override
Produce a String from a sequence of UTF-16 encoded bytes. This method always
strips a leading BOM. Set the replacementCodepoint
to null to throw an
ArgumentError rather than replace the bad value. The default
value for the replacementCodepoint
is U+FFFD.
Implementation
@override
String convert(
List<int> input, [
int start = 0,
int? end,
int replacementCodepoint = unicodeReplacementCharacterCodepoint,
]) {
var codeunits = (Utf16BytesToCodeUnitsDecoder(input, start,
end == null ? input.length : end - start, replacementCodepoint))
.decodeRest();
return String.fromCharCodes(
utf16CodeUnitsToCodepoints(codeunits, 0, null, replacementCodepoint)
.whereType<int>());
}