NSString.contains(_:) returns false for empty string argument

This depends on whether Foundation is imported. We have:

"foo".contains("") // ⟹ true

but

import Foundation
"foo".contains("") // ⟹ false

This is not expected.

16 Likes