метод convert
inherited
Преобразует bytes (список беззнаковых 7- или 8-битных целых чисел) в соответствующую строку.
Если указаны start и end, для преобразования используются только байты из подсписка от start до end (не включая end).
Реализация
String convert(List<int> bytes, [int start = 0, int? end]) {
end = RangeError.checkValidRange(start, end, bytes.length);
for (var i = start; i < end; i++) {
var byte = bytes[i];
if ((byte & ~_subsetMask) != 0) {
if (!_allowInvalid) {
throw FormatException("Invalid value in input: $byte");
}
return _convertInvalid(bytes, start, end);
}
}
return String.fromCharCodes(bytes, start, end);
}
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-convert/AsciiDecoder/convert.html