removeSuffix method

String removeSuffix(
  1. String suffix
)

Implementation

String removeSuffix(String suffix) {
  if (endsWith(suffix)) {
    return substring(0, length - suffix.length);
  }
  return this;
}