startsWith static method

bool startsWith(
  1. String value,
  2. Pattern pattern, [
  3. int index = 0
])

Returns true if the character from value at index matches pattern or false (including if index is if out of range).

Implementation

static bool startsWith(final String value, final Pattern pattern,
    [final int index = 0]) {
  return (index < 0 || index >= value.length)
      ? false
      : value.startsWith(pattern, index);
}