public function __construct($str, $offset = 0) { $this->str = $str; $this->strlen = strlen($str); $this->p = $offset; }