Skip to content

Commit

Permalink
Add a comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
phildrone committed Oct 17, 2016
1 parent 0ee1679 commit 6545833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions SwiftStrings.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ words
let alpha : CharacterSet = .alphanumerics
let alphaWords = sentence.unicodeScalars.split { !alpha.contains($0) }.reversed().map { String($0) }
alphaWords

// but the alphanumeric character set excludes emoji! Oh no!
let whitespace : CharacterSet = .whitespacesAndNewlines
let punc : CharacterSet = .punctuationCharacters
let whitespaceAndPunc = whitespace.union(punc)
Expand All @@ -103,6 +105,3 @@ betterWords






Binary file not shown.

0 comments on commit 6545833

Please sign in to comment.