|
@@ 1685-1691 (lines=7) @@
|
| 1682 |
|
* |
| 1683 |
|
* @return Stringy Object whose $str has had tabs switched to spaces |
| 1684 |
|
*/ |
| 1685 |
|
public function toSpaces($tabLength = 4) |
| 1686 |
|
{ |
| 1687 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1688 |
|
$str = UTF8::str_replace("\t", $spaces, $this->str); |
| 1689 |
|
|
| 1690 |
|
return static::create($str, $this->encoding); |
| 1691 |
|
} |
| 1692 |
|
|
| 1693 |
|
/** |
| 1694 |
|
* Converts each occurrence of some consecutive number of spaces, as |
|
@@ 1702-1708 (lines=7) @@
|
| 1699 |
|
* |
| 1700 |
|
* @return Stringy Object whose $str has had spaces switched to tabs |
| 1701 |
|
*/ |
| 1702 |
|
public function toTabs($tabLength = 4) |
| 1703 |
|
{ |
| 1704 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1705 |
|
$str = UTF8::str_replace($spaces, "\t", $this->str); |
| 1706 |
|
|
| 1707 |
|
return static::create($str, $this->encoding); |
| 1708 |
|
} |
| 1709 |
|
|
| 1710 |
|
/** |
| 1711 |
|
* Converts the first character of each word in the string to uppercase. |