Stringy\Stringy::toTabs PHP Метод

toTabs() публичный метод

Converts each occurrence of some consecutive number of spaces, as defined by $tabLength, to a tab. By default, each 4 consecutive spaces are converted to a tab.
public toTabs ( integer $tabLength = 4 ) : Stringy
$tabLength integer Number of spaces to replace with a tab
Результат Stringy Object whose $str has had spaces switched to tabs
    public function toTabs($tabLength = 4)
    {
        $spaces = str_repeat(' ', $tabLength);
        $str = str_replace($spaces, "\t", $this->str);
        return static::create($str, $this->encoding);
    }