Clarify `String.get_slice` behavior

Clarify that the function returns the whole string if there is no
instances of the delimiter in the string.
This commit is contained in:
Ninni Pipping 2023-06-20 10:30:02 +02:00
parent 73ac33342f
commit edff9ebd18
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@
<param index="0" name="delimiter" type="String" />
<param index="1" name="slice" type="int" />
<description>
Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist.
Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns the original string if [param delimiter] does not occur in the string. Returns an empty string if the [param slice] does not exist.
This is faster than [method split], if you only need one substring.
[b]Example:[/b]
[codeblock]