readString method
Reads a part of the buffer starting at offset as an UTF-8
encoded string.
If byteCnt is omitted, it is assumed the UTF-8 encoded string
in the buffer is zero terminated.
allowMalformed is passed to utf8.decode to allow or disallow
invalid UTF-8 sequences in the buffer.
Implementation
String readString(int offset, [int? byteCnt, bool allowMalformed = true]) {
return readFromBufferAsString(this, offset, byteCnt, allowMalformed);
}