localizedStandardCompare(_:)
Compares strings as sorted by the Finder.
Declaration
func localizedStandardCompare(_ string: String) -> ComparisonResultParameters
- string:
The string to compare with the receiver.
Return Value
The result of the comparison.
Discussion
This method should be used whenever file names or other strings are presented in lists and tables where Finder-like sorting is appropriate. The exact sorting behavior of this method is different under different locales and may be changed in future releases. This method uses the current locale.