fromUtf8 function
Converts 8-bit UTF-8 octet sequence to UTF-8 character code points.
Parameters:
inputshould be a valid UTF-8 octet sequence.codecis the UTF8Codec to use.
Throws:
- FormatException if the
inputis not a valid UTF-8 octet sequence.
Implementation
@pragma('vm:prefer-inline')
@pragma('dart2js:tryInline')
String fromUtf8(
List<int> input, {
UTF8Codec codec = UTF8Codec.standard,
}) =>
codec.decoder.decode(
input is Uint8List ? input : Uint8List.fromList(input),
);