1--TEST-- 2Bug #79787 mb_strimwidth does not trim string 3--SKIPIF-- 4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> 5--FILE-- 6<?php 7echo mb_strimwidth("一二三", 0, 4, '.', 'UTF-8')."\n"; 8echo mb_strimwidth("一二三", 0, 5, '.', 'UTF-8')."\n"; 9echo mb_strimwidth("一二三", 0, 6, '.', 'UTF-8')."\n"; 10echo mb_strimwidth("abcdef", 0, 4, '.', 'UTF-8')."\n"; 11echo mb_strimwidth("abcdef", 0, 5, '.', 'UTF-8')."\n"; 12echo mb_strimwidth("abcdef", 0, 6, '.', 'UTF-8')."\n"; 13?> 14--EXPECT-- 15一. 16一二. 17一二三 18abc. 19abcd. 20abcdef 21