public function testSpan() { $this->eq(s::characterRun('aaab', 'a'), 3); $this->eq(s::characterRun('xyz', 'a'), 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); }
public static function capture($callback) { return new self(s::capture($callback)); }
public function join($str = '') { return new XString(s::join(XString::unwrap($str), $this->value)); }