writeString method

void writeString(
  1. MemoryPointer<RType> p,
  2. String value,
  3. int maxLength
)

Implementation

void writeString(MemoryPointer p, String value, int maxLength) {
  _check(p, 'writeString');
  return switch (type) {
    RInt8() => p.cast<RInt8>().writeString(value, maxLength),
    RInt16() => p.cast<RInt16>().writeString(value, maxLength),
    RInt32() => p.cast<RInt32>().writeString(value, maxLength),
    _ => throw UnsupportedError("Invalid type $R for writing a string value."),
  };
}