Merge pull request #56826 from noidexe/patch-3
This commit is contained in:
commit
38a54084be
1 changed files with 6 additions and 0 deletions
|
@ -470,6 +470,12 @@
|
|||
// There is no sort support for Godot.Collections.Array
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
To perform natural order sorting, you can use [method sort_custom] with [method String.naturalnocasecmp_to] as follows:
|
||||
[codeblock]
|
||||
var strings = ["string1", "string2", "string10", "string11"]
|
||||
strings.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) < 0)
|
||||
print(strings) # Prints [string1, string2, string10, string11]
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="sort_custom">
|
||||
|
|
Loading…
Reference in a new issue