mbstring.php and mb_strimwidth issue-Collection of common programming errors

Months ago I made a short code that uses mb_strimwidth() to exactly fit some text into a table cell, putting dots at the end of a truncated string. Now, after some times, I tried to execute that same code and it went out with this error:

Fatal error: Call to undefined function mb_strimwidth() in ...

I tried to find the mbstring.php file, and when I found the mb_strimwidth() function, I discovered that it is not implemented anymore. How is that possible? But my main question is: how can I get the same result as mb_strimwidth()? I thought to rewrite the function using a loop and mb_strwidth(), but ALL the functions in that mbstring.php file are empty.