takeWhile method

String takeWhile(
  1. bool predicate(
    1. String
    )
)

Returns a string containing the first characters that satisfy the given predicate.

@sample samples.text.Strings.take

Implementation

String takeWhile(bool Function(String) predicate) =>
    this.characters.takeWhile(predicate).string;