removeFirstAndLastEqual method
- String? pattern
Removes any pattern
match from the beginning & the end of the String
.
Example
String edited = "abracadabra".removeFirstAndLastEqual("a"); // returns "bracadabr";
Implementation
String removeFirstAndLastEqual(String? pattern) => removeFirstEqual(pattern).removeLastEqual(pattern);