diff --git a/Sources/Unbox.swift b/Sources/Unbox.swift index 59faca9..685c32a 100644 --- a/Sources/Unbox.swift +++ b/Sources/Unbox.swift @@ -219,6 +219,12 @@ extension Bool: UnboxableRawType { } public static func transformUnboxedString(unboxedString: String) -> Bool? { + for element in [ "true", "t" , "y", "yes" ] where element.uppercased() == unboxedString.uppercased() { + return true + } + for element in [ "false", "f" , "n", "no" ] where element.uppercased() == unboxedString.uppercased() { + return false + } return nil } }