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

Merge pull request #157 from OlivierBarbier/master

Reuse substr method
This commit is contained in:
Daniel St. Jules
2017-02-28 23:46:09 -05:00
committed by GitHub

View File

@@ -1242,9 +1242,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess
$length = $end - $start;
}
$str = \mb_substr($this->str, $start, $length, $this->encoding);
return static::create($str, $this->encoding);
return $this->substr($start, $length);
}
/**