|
@@ 784-793 (lines=10) @@
|
| 781 |
|
* |
| 782 |
|
* @return Stringy Object with the first character of $str being lower case |
| 783 |
|
*/ |
| 784 |
|
public function lowerCaseFirst() |
| 785 |
|
{ |
| 786 |
|
$first = mb_substr($this->str, 0, 1, $this->encoding); |
| 787 |
|
$rest = mb_substr($this->str, 1, $this->length() - 1, |
| 788 |
|
$this->encoding); |
| 789 |
|
|
| 790 |
|
$str = mb_strtolower($first, $this->encoding) . $rest; |
| 791 |
|
|
| 792 |
|
return static::create($str, $this->encoding); |
| 793 |
|
} |
| 794 |
|
|
| 795 |
|
/** |
| 796 |
|
* Returns whether or not a character exists at an index. Offsets may be |
|
@@ 1556-1565 (lines=10) @@
|
| 1553 |
|
* |
| 1554 |
|
* @return Stringy Object with the first character of $str being upper case |
| 1555 |
|
*/ |
| 1556 |
|
public function upperCaseFirst() |
| 1557 |
|
{ |
| 1558 |
|
$first = mb_substr($this->str, 0, 1, $this->encoding); |
| 1559 |
|
$rest = mb_substr($this->str, 1, $this->length() - 1, |
| 1560 |
|
$this->encoding); |
| 1561 |
|
|
| 1562 |
|
$str = mb_strtoupper($first, $this->encoding) . $rest; |
| 1563 |
|
|
| 1564 |
|
return static::create($str, $this->encoding); |
| 1565 |
|
} |
| 1566 |
|
|
| 1567 |
|
/** |
| 1568 |
|
* Returns the replacements for the toAscii() method. |