Empty strings in Swift
Forums:
//Empty strings
let someEmptyString = ""
let anotherEmptyString = String()
if anotherEmptyString.isEmpty {
//string is empty
}
- Log in to post comments
//Empty strings
let someEmptyString = ""
let anotherEmptyString = String()
if anotherEmptyString.isEmpty {
//string is empty
}