toDartString method

String toDartString({
  1. bool zeroTerminated = false,
})

Implementation

String toDartString({bool zeroTerminated = false}) {
  if (zeroTerminated) {
    return utf8.decode(takeWhile((value) => value != 0).toList());
  } else {
    return utf8.decode(this);
  }
}