|
@@ 1920-1926 (lines=7) @@
|
| 1917 |
|
* |
| 1918 |
|
* @return Stringy Object whose $str has had tabs switched to spaces |
| 1919 |
|
*/ |
| 1920 |
|
public function toSpaces($tabLength = 4) |
| 1921 |
|
{ |
| 1922 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1923 |
|
$str = UTF8::str_replace("\t", $spaces, $this->str); |
| 1924 |
|
|
| 1925 |
|
return static::create($str, $this->encoding); |
| 1926 |
|
} |
| 1927 |
|
|
| 1928 |
|
/** |
| 1929 |
|
* Converts each occurrence of some consecutive number of spaces, as |
|
@@ 1937-1943 (lines=7) @@
|
| 1934 |
|
* |
| 1935 |
|
* @return Stringy Object whose $str has had spaces switched to tabs |
| 1936 |
|
*/ |
| 1937 |
|
public function toTabs($tabLength = 4) |
| 1938 |
|
{ |
| 1939 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1940 |
|
$str = UTF8::str_replace($spaces, "\t", $this->str); |
| 1941 |
|
|
| 1942 |
|
return static::create($str, $this->encoding); |
| 1943 |
|
} |
| 1944 |
|
|
| 1945 |
|
/** |
| 1946 |
|
* Converts the first character of each word in the string to uppercase. |