skipTo method

String skipTo(
  1. Pattern pattern
)

Returns the string suffix after the first occurrence of pattern. If the pattern is not found return the empty string.

Implementation

String skipTo(Pattern pattern) {
  final index = indexOf(pattern);
  if (index < 0) return substring(0, 0);
  return substring(pattern.matchAsPrefix(this, index)!.end);
}