1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/mbstring/tests/bug79787.phpt
XXiang 3d5de7d746 Fix bug #79787
Closes GH-5807.
2020-07-08 11:20:58 +02:00

21 lines
552 B
PHP

--TEST--
Bug #79787 mb_strimwidth does not trim string
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
echo mb_strimwidth("一二三", 0, 4, '.', 'UTF-8')."\n";
echo mb_strimwidth("一二三", 0, 5, '.', 'UTF-8')."\n";
echo mb_strimwidth("一二三", 0, 6, '.', 'UTF-8')."\n";
echo mb_strimwidth("abcdef", 0, 4, '.', 'UTF-8')."\n";
echo mb_strimwidth("abcdef", 0, 5, '.', 'UTF-8')."\n";
echo mb_strimwidth("abcdef", 0, 6, '.', 'UTF-8')."\n";
?>
--EXPECT--
一.
一二.
一二三
abc.
abcd.
abcdef