read static method

LiftRetVal<String?> read(
  1. Uint8List buf
)

Implementation

static LiftRetVal<String?> read(Uint8List buf) {
  if (ByteData.view(buf.buffer, buf.offsetInBytes).getInt8(0) == 0) {
    return LiftRetVal(null, 1);
  }
  final result = FfiConverterString.read(
    Uint8List.view(buf.buffer, buf.offsetInBytes + 1),
  );
  return LiftRetVal<String?>(result.value, result.bytesRead + 1);
}