Str::increment()
Adds -1 to a string or increments the ending number to allow -2, -3, etc.
Str::increment(string $string, string $separator = '-', int $first = 1): non-empty-string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $stringrequired | string |
no default value | |
| $separator | string |
'-'
|
|
| $first | int |
1
|
Starting number |
Return type
non-empty-string