I want a bash function to count for the String Width that will comsumed when display. because in my cases, String may contain some wide-charactors (e.g. Chinese). So I cannot just use the length of a string.
function getDisplayWidth ()
{
???
}
Then "abc" will return 3 and "前后" should return 4 instead of 2.