PrefixSuffixStringExtension extension

on

Methods

removePrefix(Pattern pattern) String

Available on String, provided by the PrefixSuffixStringExtension extension

If the string starts with the prefix pattern returns this String with the prefix removed, otherwise return this.
removeSuffix(Pattern pattern) String

Available on String, provided by the PrefixSuffixStringExtension extension

If the string ends with the suffix pattern returns this String with the suffix removed, otherwise return this.