xref: /PHP-8.1/ext/mbstring/tests/bug79787.phpt (revision 39131219)
1--TEST--
2Bug #79787 mb_strimwidth does not trim string
3--EXTENSIONS--
4mbstring
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