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:
committed by
Olivier Barbier
parent
de93eab01f
commit
916f79221e
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user