dropLeftWhile method

String dropLeftWhile(
  1. bool condition(
    1. String
    )
)

Drop left while the condition is met.

Implementation

String dropLeftWhile(bool Function(String) condition) {
  if (this == null) {
    throw ArgumentError('string: $this');
  }
  if (this!.isEmpty) {
    return '';
  }
  var index = 0;
  while (index < this!.length && condition(this![index])) {
    index++;
  }
  return this!.substring(index);
}