Calculate string lengths according to different metrics (Unicode code point count, USC-2 "character" count, byte length, etc.).