mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 05:19:50 +01:00
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:
parent
97dee88433
commit
c25ea39a3b
@ -463,7 +463,7 @@
|
||||
<argument index="0" name="delimiter" type="String" />
|
||||
<argument index="1" name="slice" type="int" />
|
||||
<description>
|
||||
Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
|
||||
Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns the original string if [code]delimiter[/code] does not occur in the string. Returns an empty string if the index doesn't exist.
|
||||
This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
|
||||
Example:
|
||||
[codeblock]
|
||||
|
Loading…
Reference in New Issue
Block a user