{"id":3379,"date":"2014-03-23T13:50:08","date_gmt":"2014-03-23T13:50:08","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/mbstring-php-and-mb_strimwidth-issue-collection-of-common-programming-errors-2\/"},"modified":"2014-03-23T13:50:08","modified_gmt":"2014-03-23T13:50:08","slug":"mbstring-php-and-mb_strimwidth-issue-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/mbstring-php-and-mb_strimwidth-issue-collection-of-common-programming-errors-2\/","title":{"rendered":"mbstring.php and mb_strimwidth issue-Collection of common programming errors"},"content":{"rendered":"<p>Months ago I made a short code that uses <code>mb_strimwidth()<\/code> 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:<\/p>\n<pre><code>Fatal error: Call to undefined function mb_strimwidth() in ...\n<\/code><\/pre>\n<p>I tried to find the mbstring.php file, and when I found the <code>mb_strimwidth()<\/code> 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 <code>mb_strimwidth()<\/code>? I thought to rewrite the function using a loop and <code>mb_strwidth()<\/code>, but ALL the functions in that mbstring.php file are empty.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3379","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3379"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3379\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}