diff options
Diffstat (limited to 'doc/classes/Array.xml')
-rw-r--r-- | doc/classes/Array.xml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 5f100d918e..08455bb7bc 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Array" version="3.2"> +<class name="Array" version="4.0"> <brief_description> Generic array datatype. </brief_description> @@ -322,7 +322,12 @@ <method name="sort"> <description> Sorts the array. - [b]Note:[/b] strings are sorted in alphabetical, not natural order. + [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: + [codeblock] + var strings = ["string1", "string2", "string10", "string11"] + strings.sort() + print(strings) # Prints [string1, string10, string11, string2] + [/codeblock] </description> </method> <method name="sort_custom"> |