A fast function for calculating where a string should be truncated, given a width limit and an ellipsis string. This is a low-level function that basically calculates the visual width of a string and ...