Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes