|
@@ 1871-1877 (lines=7) @@
|
| 1868 |
|
* |
| 1869 |
|
* @return Stringy Object whose $str has had tabs switched to spaces |
| 1870 |
|
*/ |
| 1871 |
|
public function toSpaces($tabLength = 4) |
| 1872 |
|
{ |
| 1873 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1874 |
|
$str = UTF8::str_replace("\t", $spaces, $this->str); |
| 1875 |
|
|
| 1876 |
|
return static::create($str, $this->encoding); |
| 1877 |
|
} |
| 1878 |
|
|
| 1879 |
|
/** |
| 1880 |
|
* Converts each occurrence of some consecutive number of spaces, as |
|
@@ 1888-1894 (lines=7) @@
|
| 1885 |
|
* |
| 1886 |
|
* @return Stringy Object whose $str has had spaces switched to tabs |
| 1887 |
|
*/ |
| 1888 |
|
public function toTabs($tabLength = 4) |
| 1889 |
|
{ |
| 1890 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1891 |
|
$str = UTF8::str_replace($spaces, "\t", $this->str); |
| 1892 |
|
|
| 1893 |
|
return static::create($str, $this->encoding); |
| 1894 |
|
} |
| 1895 |
|
|
| 1896 |
|
/** |
| 1897 |
|
* Converts the first character of each word in the string to uppercase. |