removePrefixIfPresent method
Remove the prefix of a String if present or return current String.
Implementation
String removePrefixIfPresent(String toRemove) {
if (!startsWith(toRemove)) {
return this;
}
return replaceFirst(toRemove, "");
}