Str::substr()
A UTF-8 safe version of substr()
Str::substr(string|null $string, int $start = 0, int|null $length = null): string
Parameters
| Name | Type | Default |
|---|---|---|
| $string | stringornull |
no default value |
| $start | int |
0
|
| $length | intornull |
null
|
Return type
string