replaceFirst method Null safety
- Characters pattern,
- Characters replacement
Replaces the first occurrence of pattern
with replacement
.
Returns a new Characters where the first occurence of the
pattern
character sequence, if any, is replaced by replacement
.
Returns the current characters if there is no occurrence of pattern
.
Implementation
Characters replaceFirst(Characters pattern, Characters replacement);