php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/php-7.0.1/ext/mbstring/tests/ |
files >> //opt/php-7.0.1/ext/mbstring/tests/mb_strcut.phpt |
--TEST-- mb_strcut() --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> --INI-- output_handler= --FILE-- <?php // TODO: Add more encodings ini_set('include_path', dirname(__FILE__)); include_once('common.inc'); // EUC-JP $euc_jp = '0123ʸܸǤEUC-JPȤäƤޤܸݽ'; print mb_strcut($euc_jp, 6, 5,'EUC-JP') . "\n"; print mb_strcut($euc_jp, 0, 100,'EUC-JP') . "\n"; $str = mb_strcut($euc_jp, 100, 10,'EUC-JP'); ($str === false) ? print "OK\n" : print "NG: $str\n"; $str = mb_strcut($euc_jp, -100, 10,'EUC-JP'); ($str !== "") ? print "OK: $str\n" : print "NG:\n"; ?> --EXPECT-- ʸ 0123ʸܸǤEUC-JPȤäƤޤܸݽ OK OK: 0123ʸy~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`