A fast function for calculating the visual width of a string once printed to the terminal.