readUtf8String method

String readUtf8String()

Fetch a utf8 string from the bytes list

Implementation

String readUtf8String() {
  final length = readUint32();
  final start = ip;
  ip += length;
  final codeUnits = bytes.sublist(start, ip);
  return utf8.decoder.convert(codeUnits);
}