StrParser constructor

StrParser(
  1. String s
)

Implementation

StrParser(this.s)
    : _length = s.length << 1,
      _res = Tuple1(s) {
  if (s.isEmpty) {
    ArgumentError.value(s, 's', 'Must not be empty');
  }

  _c = s.codeUnitAt(0);
  var str = s;
  str = str.replaceAll('\r', '\\r');
  str = str.replaceAll('\n', '\\n');
  str = str.replaceAll('\t', '\\t');
  label = 'str($str)';
}