Created
September 27, 2014 04:22
-
-
Save inamiy/1cab6bcbe175290a346d to your computer and use it in GitHub Desktop.
Swiftのnilがなるほどわからん ref: http://qiita.com/inamiy/items/b186e9612352b31261df
This file contains 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 str: NSString? = nil | |
str?.length == 0 // false | |
str?.length > 0 // false | |
str?.length < 0 // true | |
nil == 0 // false | |
nil > 0 // false | |
nil < 0 // true |
This file contains 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
nil == true // false | |
nil == false // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment