From 916f79221eeca5cf470e04d49540cd8be416eb8a Mon Sep 17 00:00:00 2001 From: Olivier Barbier Date: Thu, 16 Feb 2017 12:09:53 +0100 Subject: [PATCH] Reuse substr method --- src/Stringy.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Stringy.php b/src/Stringy.php index 2e4bac0..b20be5d 100644 --- a/src/Stringy.php +++ b/src/Stringy.php @@ -1216,9 +1216,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); } /**