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

Reuse substr method

This commit is contained in:
Olivier Barbier
2017-02-16 12:09:53 +01:00
committed by Olivier Barbier
parent de93eab01f
commit 916f79221e

View File

@@ -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);
}
/**