Open yo1995 opened 3 weeks ago
Please see the Swift forum post for details: https://forums.swift.org/t/nsstring-contains-returns-false-for-empty-string-argument/3949
It seems that the current implementation in Foundation has this problem, while the implementation in _StringProcessing doesn't.
Foundation
_StringProcessing
// Without importing Foundation "foo".contains("") // ⟹ true import Foundation "foo".contains("") // ⟹ false
Description
Please see the Swift forum post for details: https://forums.swift.org/t/nsstring-contains-returns-false-for-empty-string-argument/3949
It seems that the current implementation in
Foundation
has this problem, while the implementation in_StringProcessing
doesn't.