Go Package sort: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 16: | Line 16: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</font> | </font> | ||
To sort slices, <code>slices.Sort*</code> is preferred. | |||
=Example= | =Example= | ||
<font color=red>'''TODO''' Introducing Go page 83.</font> | <font color=red>'''TODO''' Introducing Go page 83.</font> |
Revision as of 17:08, 12 June 2024
External
Internal
Overview
The package provides primitives for sorting slices of ints and floats and user-defined collections.
The sort
package.
sort.Ints(slice)
sort.Float64s(slice)
sort.Strings(slice)
To sort slices, slices.Sort*
is preferred.
Example
TODO Introducing Go page 83.