strSplit() 공개 정적인 메소드

By default this works properly with UTF8 strings.
public static strSplit ( string $str, integer $length = 1 ) : array
$str string
$length integer
리턴 array Result
예제 #1
0
 /**
  * UtilityTest::testStrSplit()
  *
  * @covers ::strSplit
  * @return void
  */
 public function testStrSplit()
 {
     $res = str_split('some äöü string', 7);
     $expected = ['some äö', 'ü strin', 'g'];
     $this->assertNotSame($expected, $res);
     $res = Utility::strSplit('some äöü string', 7);
     $this->assertSame($expected, $res);
 }