1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-13 16:53:59 +02:00

Use Stringy's trim() method in applyDelimiter()

This trim() method may be more powerful in the future.
This commit is contained in:
vlakoff
2015-01-17 01:53:01 +01:00
parent f3bd5b6c62
commit 36c3fd05d2

View File

@@ -305,7 +305,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
$regexEncoding = mb_regex_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_strtolower($str, $this->encoding);