Helpers for working with strings in Swift.
Converts a String
to a Bool
.
The conversion is based on Apple's truthiness rules:
This property is true on encountering one of "Y", "y", "T", "t", or a digit 1-9
"YES".boolValue == true
"NO".boolValue == false
"yes".boolValue == true
"no".boolValue == false
"TRUE".boolValue == true
"FALSE".boolValue == false
"true".boolValue == true
"false".boolValue == false
"1".boolValue == true
"0".boolValue == false
link |
Stars: 0 |
Last commit: 4 years ago |
Initial version of this library. Includes a method to allow the conversion of a String
to a Bool
.
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics