mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-14 01:04:06 +02:00
Use Stringy's trim() method in applyDelimiter()
This trim() method may be more powerful in the future.
This commit is contained in:
@@ -305,7 +305,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||||||
$regexEncoding = mb_regex_encoding();
|
$regexEncoding = mb_regex_encoding();
|
||||||
mb_regex_encoding($this->encoding);
|
mb_regex_encoding($this->encoding);
|
||||||
|
|
||||||
$str = mb_ereg_replace('\B([A-Z])', $delimiter .'\1', trim($this->str));
|
$str = mb_ereg_replace('\B([A-Z])', $delimiter .'\1', $this->trim());
|
||||||
$str = mb_ereg_replace('[-_\s]+', $delimiter, $str);
|
$str = mb_ereg_replace('[-_\s]+', $delimiter, $str);
|
||||||
$str = mb_strtolower($str, $this->encoding);
|
$str = mb_strtolower($str, $this->encoding);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user