Blank string in Swift
extension String { var isBlank: Bool { get { let trimmed = stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()) return trimmed.isEmpty } } }