collapseToLast method Null safety

bool collapseToLast(
  1. Characters target
)

Collapses to the last 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 last 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 collapseToLast(Characters target);