예제 #1
0
 public function testStartsWith()
 {
     $str = new Str("Hello, world.");
     $this->assertTrue($str->startsWith("H"));
     $this->assertTrue($str->startsWith("Hello,"));
     $this->assertTrue($str->startsWith("HE", 0, true));
     $this->assertTrue($str->startsWith("HE", null, true));
     $this->assertFalse($str->startsWith("."));
     $this->assertFalse($str->startsWith("world."));
     $this->assertFalse($str->startsWith("LD."));
 }