In Objective C, one could do the following to check for strings:
if ([myString isEqualToString:@\"\"]) { NSLog(@\"m
Use
var isEmpty: Bool { get }
Example
let lang = "Swift 5" if lang.isEmpty { print("Empty string") }
If you want to ignore white spaces
if lang.trimmingCharacters(in: .whitespaces).isEmpty { print("Empty string") }