readLengthCodedString method Null safety

String? readLengthCodedString()

Returns a length coded string, read from the buffer.

Implementation

String? readLengthCodedString() {
  int? length = readLengthCodedBinary();
  if (length == null) return null;
  return string(length);
}