예제 #1
0
 public function testSpan()
 {
     $this->eq(s::characterRun('aaab', 'a'), 3);
     $this->eq(s::characterRun('xyz', 'a'), 0);
 }
예제 #2
0
 /**
  * Strip off the `path` from an absolute path, or return `null` if the
  * path does not match.
  *
  * @param string $abs_path
  * @return string|null
  */
 public function removePath($abs_path)
 {
     return \Jitsu\StringUtil::removePrefix($abs_path, $this->base_path);
 }
예제 #3
0
 public static function capture($callback)
 {
     return new self(s::capture($callback));
 }
예제 #4
0
 public function join($str = '')
 {
     return new XString(s::join(XString::unwrap($str), $this->value));
 }