Swift Programming Language mentions using isEmpty to check for empty string. Are there cases where checking string against "" not yield the same result as using isEmpty?
In other words:
if str.isEmpty {
XCTAssert(str == "", "This should be true as well")
}
From the documentation:
Find out whether a String value is empty by checking its Boolean isEmpty property:
if emptyString.isEmpty {
print("Nothing to see here")
}