|
@@ 1989-1995 (lines=7) @@
|
| 1986 |
|
* |
| 1987 |
|
* @return Stringy Object whose $str has had tabs switched to spaces |
| 1988 |
|
*/ |
| 1989 |
|
public function toSpaces($tabLength = 4) |
| 1990 |
|
{ |
| 1991 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 1992 |
|
$str = UTF8::str_replace("\t", $spaces, $this->str); |
| 1993 |
|
|
| 1994 |
|
return static::create($str, $this->encoding); |
| 1995 |
|
} |
| 1996 |
|
|
| 1997 |
|
/** |
| 1998 |
|
* Converts each occurrence of some consecutive number of spaces, as |
|
@@ 2006-2012 (lines=7) @@
|
| 2003 |
|
* |
| 2004 |
|
* @return Stringy Object whose $str has had spaces switched to tabs |
| 2005 |
|
*/ |
| 2006 |
|
public function toTabs($tabLength = 4) |
| 2007 |
|
{ |
| 2008 |
|
$spaces = UTF8::str_repeat(' ', $tabLength); |
| 2009 |
|
$str = UTF8::str_replace($spaces, "\t", $this->str); |
| 2010 |
|
|
| 2011 |
|
return static::create($str, $this->encoding); |
| 2012 |
|
} |
| 2013 |
|
|
| 2014 |
|
/** |
| 2015 |
|
* Converts the first character of each word in the string to uppercase. |