예제 #1
0
 /**
  * Test that endsWith() returns true if the end of the string matches the needle.
  */
 public function testEndsWith()
 {
     $this->assertTrue(String::endsWith($this->string, 'work'));
     $this->assertFalse(String::endsWith($this->string, 'works'));
     // case-insensitive
     $this->assertTrue(String::endsWith($this->string, 'WORK', false));
     $this->assertFalse(String::endsWith($this->string, 'WORKS', false));
 }
예제 #2
0
 function str_ends_with($string, $needle, $strict = true)
 {
     return String::endsWith($string, $needle, $strict);
 }