コード例 #1
0
ファイル: test-str.php プロジェクト: iCaspar/WPDC_Core
 public function test_is()
 {
     $this->assertTrue(Str::is('/', '/'));
     $this->assertFalse(wpdevsclub_str_is('/', ' /'));
     $this->assertFalse(Str::is('/', '/a'));
     $this->assertTrue(wpdevsclub_str_is('foo/*', 'foo/bar/baz'));
     $this->assertTrue(Str::is('*/foo', 'blah/baz/foo'));
 }
コード例 #2
0
ファイル: str-helpers.php プロジェクト: iCaspar/WPDC_Core
 /**
  * Determine if a given string matches a given pattern.
  *
  * @param  string  $pattern
  * @param  string  $value
  * @return bool
  */
 function wpdevsclub_str_is($pattern, $value)
 {
     return Str::is($pattern, $value);
 }