writeCString method

void writeCString(
  1. String val
)

Implementation

void writeCString(String val) {
  final utfData = utf8.encode(val);
  byteList.setRange(offset, offset + utfData.length, utfData);
  offset += utfData.length;
  writeByte(0);
}