How can i elegantly delete all the characters from the end of the string to make it match the exact length.
For example i have a string 1234567.... I need a string with length 6, so i need to delete 7.... Note 7... may contain any amount of symbols.
You can index a string with a range: