String trimStringRight(String trim) { if (endsWith(trim)) { return substring(trim.length); } return this; }