collapseToFirst method Null safety

bool collapseToFirst(
  1. Characters target
)

Collapses to the first occurrence of target in the current range.

If there is an occurrence of target in the characters of the current range, then the new range contains exactly the characters of the first such occurrence.

If there is no such occurrence, the range is not changed.

Returns true if there is an occurrence of target and false if not.

Implementation

bool collapseToFirst(Characters target);