|
@@ 1696-1702 (lines=7) @@
|
| 1693 |
|
* |
| 1694 |
|
* @return Stringy Object whose $str has had tabs switched to spaces |
| 1695 |
|
*/ |
| 1696 |
|
public function toSpaces($tabLength = 4) |
| 1697 |
|
{ |
| 1698 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1699 |
|
$str = UTF8::str_replace("\t", $spaces, $this->str); |
| 1700 |
|
|
| 1701 |
|
return static::create($str, $this->encoding); |
| 1702 |
|
} |
| 1703 |
|
|
| 1704 |
|
/** |
| 1705 |
|
* Converts each occurrence of some consecutive number of spaces, as |
|
@@ 1713-1719 (lines=7) @@
|
| 1710 |
|
* |
| 1711 |
|
* @return Stringy Object whose $str has had spaces switched to tabs |
| 1712 |
|
*/ |
| 1713 |
|
public function toTabs($tabLength = 4) |
| 1714 |
|
{ |
| 1715 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1716 |
|
$str = UTF8::str_replace($spaces, "\t", $this->str); |
| 1717 |
|
|
| 1718 |
|
return static::create($str, $this->encoding); |
| 1719 |
|
} |
| 1720 |
|
|
| 1721 |
|
/** |
| 1722 |
|
* Converts the first character of each word in the string to uppercase. |