doc: Fix String.rsplit code example
Fixes #36898.
Supersedes and closes #36951.
(cherry picked from commit e7fd0ec31f
)
This commit is contained in:
parent
e97893ba0e
commit
81eda4eee0
1 changed files with 2 additions and 2 deletions
|
@ -688,8 +688,8 @@
|
||||||
var some_string = "One,Two,Three,Four"
|
var some_string = "One,Two,Three,Four"
|
||||||
var some_array = some_string.rsplit(",", true, 1)
|
var some_array = some_string.rsplit(",", true, 1)
|
||||||
print(some_array.size()) # Prints 2
|
print(some_array.size()) # Prints 2
|
||||||
print(some_array[0]) # Prints "Four"
|
print(some_array[0]) # Prints "One,Two,Three"
|
||||||
print(some_array[1]) # Prints "Three,Two,One"
|
print(some_array[1]) # Prints "Four"
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
|
Loading…
Reference in a new issue