Skip to content

Commit eff4ec3

Browse files
committed
add encoding to stringable
1 parent d4e2185 commit eff4ec3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Illuminate/Support/Stringable.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,11 +784,12 @@ public function studly()
784784
*
785785
* @param int $start
786786
* @param int|null $length
787+
* @param string $encoding
787788
* @return static
788789
*/
789-
public function substr($start, $length = null)
790+
public function substr($start, $length = null, $encoding = 'UTF-8')
790791
{
791-
return new static(Str::substr($this->value, $start, $length));
792+
return new static(Str::substr($this->value, $start, $length, $encoding));
792793
}
793794

794795
/**

0 commit comments

Comments
 (0)