string-width
Get the visual width of a string - the number of columns required to display it
widest-line
Get the visual width of the widest line in a string - the number of columns required to display it
locate-character
Get the line and column number of a specific character in a string