Exemplo n.º 1
0
 /**
  * Determine if a given string contains a given sub-string.
  *
  * @param  string        $haystack  String we're searching in
  * @param  string  $needle    sub-string we're checking if it exists
  *
  * @return bool                     If the substring exists
  */
 function str_contains($haystack, $needle)
 {
     return \Anekdotes\Support\Str::contains($haystack, $needle);
 }
Exemplo n.º 2
0
 public function testContains4()
 {
     $this->assertFalse(Str::contains('foo', ['y', 'b']));
 }