mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-12 16:24:00 +02:00
Simplify humanize
This commit is contained in:
@@ -365,8 +365,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function humanize()
|
public function humanize()
|
||||||
{
|
{
|
||||||
$str = str_replace('_id', '', $this->str);
|
$str = str_replace(array('_id', '_'), array('', ' '), $this->str);
|
||||||
$str = str_replace('_', ' ', $str);
|
|
||||||
|
|
||||||
return self::create($str, $this->encoding)->trim()->upperCaseFirst();
|
return self::create($str, $this->encoding)->trim()->upperCaseFirst();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user