how to remove last two characters of a variable code example Example: kotlin string remove last 3 digits str.substring(0, str.length() - 2);