示例#1
0
 public function testStartsWith()
 {
     $this->assertTrue(StringUtil::startsWith('Hello World', 'H'));
     $this->assertTrue(StringUtil::startsWith('Hello World', 'Hello'));
     $this->assertTrue(StringUtil::startsWith('Hello World', 'Hello World'));
     $this->assertFalse(StringUtil::startsWith('Hello World', 'World'));
     $this->assertFalse(StringUtil::startsWith('Hello World', ' Hello'));
 }