From 6545833a49cb9b3a5758a3243d86cd82686b7602 Mon Sep 17 00:00:00 2001 From: Phil Aaronson Date: Mon, 17 Oct 2016 14:52:31 -0700 Subject: [PATCH] Add a comment. --- SwiftStrings.playground/Contents.swift | 5 ++--- .../UserInterfaceState.xcuserstate | Bin 7990 -> 7990 bytes 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/SwiftStrings.playground/Contents.swift b/SwiftStrings.playground/Contents.swift index 71f3518..7e318ff 100644 --- a/SwiftStrings.playground/Contents.swift +++ b/SwiftStrings.playground/Contents.swift @@ -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) @@ -103,6 +105,3 @@ betterWords - - - diff --git a/SwiftStrings.playground/playground.xcworkspace/xcuserdata/aaronson.xcuserdatad/UserInterfaceState.xcuserstate b/SwiftStrings.playground/playground.xcworkspace/xcuserdata/aaronson.xcuserdatad/UserInterfaceState.xcuserstate index 2ae73c5dabea0e82e305621cd48af0faa6f62217..adab12ad1aa988a78d07e6dacb23f7df9450f078 100644 GIT binary patch delta 75 zcmdmHx6N*YGMD1?1#<6|9r6_zKp>{t*ucVEN5Rm<+_07-vf9Md)MT>@*B3tV>GRjW NLXm|^`b$1%1pr&T7T*8> delta 75 zcmdmHx6N*YGMA$Eb*(66hkOMF5QwQZHn6bNQ7|+yG_2)_tTr|`vfS*#^@UGd``X!B M6j`XGzvOdP03CT1n*aa+