Stringy\Stringy::toSpaces PHP Method

toSpaces() public method

Converts each tab in the string to some number of spaces, as defined by $tabLength. By default, each tab is converted to 4 consecutive spaces.
public toSpaces ( integer $tabLength = 4 ) : Stringy
$tabLength integer Number of spaces to replace each tab with
return Stringy Object whose $str has had tabs switched to spaces
    public function toSpaces($tabLength = 4)
    {
        $spaces = str_repeat(' ', $tabLength);
        $str = str_replace("\t", $spaces, $this->str);
        return static::create($str, $this->encoding);
    }