Пример #1
0
 /**
  * @covers Patchwork\Utf8::str_shuffle
  */
 function testStr_shuffle()
 {
     $c = "déjà 한국어";
     $c .= n::normalize($c, n::NFD);
     $this->assertTrue($c != ($d = u::str_shuffle($c)) || $c != ($d = u::str_shuffle($c)));
     $this->assertSame(strlen($c), strlen($d));
     $this->assertSame(u::strlen($c), u::strlen($d));
     $this->assertSame('', u::trim($d, $c));
 }
 public function test_empty_string()
 {
     $str = '';
     $trimmed = '';
     $this->assertEquals($trimmed, u::trim($str));
 }
Пример #3
0
 /**
  * XoopsLocalAbstract::trim()
  *
  * @param mixed $text
  *
  * @return string
  */
 public static function trim($text)
 {
     $ret = Utf8::trim($text);
     return $ret;
 }