Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

sort array alphabetically swift 4

var sortedArray = names.sorted { $0.localizedCaseInsensitiveCompare($1) == NSComparisonResult.OrderedAscending }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #array #alphabetically #swift
ADD COMMENT
Topic
Name
1+8 =