Remove last element of string
string
static String removeLast(String string, [int? upto]) => string.minLen(2) ? string.substring(0, string.length - upto!) : "";