We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StringProtocol.contains(_:)
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
The text was updated successfully, but these errors were encountered:
We're aware of this discrepancy, but this is one of those behavior we need to maintain for compatibility reasons.
Sorry, something went wrong.
No branches or pull requests
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.The text was updated successfully, but these errors were encountered: