Conversion bool from a string in Swift
Forums:
let str = "true"
let nsStr = str as NSString
let boolValue = nsStr.boolValue
//boolValue is true
- Log in to post comments
let str = "true"
let nsStr = str as NSString
let boolValue = nsStr.boolValue
//boolValue is true