flutter string cut from end code example
Example 1: flutter remove last caracter from string
public static String removeLastCharacter(String str) {
String result = null;
if ((str != null) && (str.length() > 0)) {
result = str.substring(0, str.length() - 1);
}
return result;
}
Example 2: flutter substring
var string = 'dartlang';
string.substring(1); // 'artlang'
string.substring(1, 4); // 'art'