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