예제 #1
0
 public function testBeginsWith()
 {
     $this->eq(s::beginsWith('abcdef', 'abc'), true);
     $this->eq(s::beginsWith('abcdef', 'xyz'), false);
     $this->eq(s::beginsWith('abcdef', 'cde'), false);
     $this->eq(s::beginsWith('', 'abc'), false);
     $this->eq(s::beginsWith('abcdef', ''), true);
     $this->eq(s::beginsWith('abc', 'abcdef'), false);
 }
예제 #2
0
 public function beginsWith($prefix)
 {
     return s::beginsWith($this->value, self::unwrap($prefix));
 }