init
This commit is contained in:
11
snippets/swift-mode/sortarrayofstrings
Normal file
11
snippets/swift-mode/sortarrayofstrings
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: sortarrayofstrings
|
||||
# key: sortarrayofstrings
|
||||
# --
|
||||
$1.sorted { (a, b) -> Bool in
|
||||
let comparisonResult = a.compare(b,
|
||||
options: [],
|
||||
range: a.range(of: a),
|
||||
locale: Locale.current)
|
||||
return comparisonResult == .orderedSame
|
||||
}
|
||||
Reference in New Issue
Block a user