public function toTabs($tabLength = 4) { $spaces = str_repeat(' ', $tabLength); $str = str_replace($spaces, "\t", $this->str); return static::create($str, $this->encoding); }