trimLeading function

String trimLeading(
  1. String pattern,
  2. String from
)

Implementation

String trimLeading(String pattern, String from) {
  int i = 0;
  while (from.startsWith(pattern, i)) {
    i += pattern.length;
  }
  return from.substring(i);
}