There is no defined "character width". The space of a character depends on its environment in a text and involves several parameters and look up tables.
For str_width we're just calling an OS function. We had to use it for any related functions just in the way Joozey suggested.