Calculates the width of a string, where halfwidth characters count as 1, and fullwidth characters count as 2.