public function testEndsWith() { $this->eq(s::endsWith('abcdef', 'def'), true); $this->eq(s::endsWith('abcdef', 'xyz'), false); $this->eq(s::endsWith('abcdef', 'bcd'), false); $this->eq(s::endsWith('a', 'def'), false); $this->eq(s::endsWith('', 'def'), false); $this->eq(s::endsWith('abcdef', ''), true); $this->eq(s::endsWith('def', 'abcdef'), false); }
public function endsWith($suffix) { return s::endsWith($this->value, self::unwrap($suffix)); }