remove last character from string java
private static String removeLastChar(String str) {
return str.substring(0, str.length() - 1);
}public static String removeLastCharacter(String str) {
String result = null;
if ((str != null) && (str.length() > 0)) {
result = str.substring(0, str.length() - 1);
}
return result;
}
Also in Java:
- bukkit java get max players
- date to string java
- spring iterate
- how to use lambda in java
- numberformatexception
- java merge sort
- cannot lock java compile cache as it has already been locked by this process
- @JsonSerializer spring specific field string to date
- get first 5 characters of string java
- java script num toSting syntax eror
- select photo from camera android
- java script removing first three indexes
- array declaration and initialization in java
- java insert into arraylist
- read lines of file randomly java
- java check if directory exists
- how to ask user for his location in android
- java random number generator in range
- how to get length of integer in java
- how to add an object to a list of objects in java
- java double 2 decimal
- find frequency of each word in a string in java
- connect 2 package in android
- java loop hashmap