String s = "Hello Worlds";
String end = "";
end = s.substring((0, s.length()-1));
private static String removeLastChar(String str) {
return str.substring(0, str.length() - 1);
}
String s = "blah blah <br/>";
if (s.endsWith("<br/>")) {
s = s.substring(0, s.length() - 5);
}
String s = "Hello Worlds";
String end = "";
end = s.substring((0, s.length()-1));
public static String removeLastChar(String str) {
return removeLastChars(str, 1);
}
public static String removeLastChars(String str, int chars) {
return str.substring(0, str.length() - chars);
}