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