Utf8StringPointer extension
- on
Methods
-
toDartString(
[int? maxLength]) → String -
Available on MemoryPointer<
Reads a NUL-terminated C string starting at this pointer, decoded as UTF-8. Scans for the NUL byte itself, no length needed.RInt8> , provided by the Utf8StringPointer extension -
writeString(
String text, [int? maxLength, int byteOffset = 0]) → void -
Available on MemoryPointer<
WritesRInt8> , provided by the Utf8StringPointer extensiontextinto a buffer field ataddress + byteOffset. IfmaxLengthis null, it's derived from the UTF-8 byte length oftext(caller is responsible for the field actually being that size). Truncates iftextexceedsmaxLength; otherwise NUL-terminates and zero-pads the remainder.