Last active
August 29, 2015 14:12
-
-
Save amonshiz/e45926df237ede6ec4a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let startSplits = split(testText, { $0 == "<" }) | |
let strippedValues = map(startSplits) { (s) -> String? in | |
if let endIndex = find(s, ">") { | |
return s[Range<String.Index>(start: endIndex.successor(), end: s.endIndex)] | |
} | |
return nil | |
} | |
let strings = strippedValues.filter({ $0 != nil }).filter({ $0 != "" }).map({ $0! }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment