Explanation: hasPrefix and hasSuffix were recently fixed for empty strings; contains comes from Foundation where the behavior is different.
-
-
-
@olebegemann is this the intended final behavior or is a transitional state? -
@rbarbera I'm assuming it will be fixed eventually. I just asked on swift-evolution, though.
-
-
-
@olebegemann I started a swift evolution thread proposing a fix and was told "we're gonna fix that as part of Swift 4". Not great but hey… -
@cdntr Oh, I missed that. Do you have a link? -
@cdntr (I had posted to the list too, and it would be nice to add a link to the previous discussion.) https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160905/026911.html … -
@cdntr Thanks. But that thread is about hasPrefix and hasSuffix, not about contains, right? -
@olebegemann If I remember correctly I sent a follow-up concerning that one at some point. Or someone else did.
-
-
-
@olebegemann regardless of the hasPrefix, that second result is just plain counter-intuitive and weird and will cause many bugs, I’d bet. - View other replies
-
@epaga Yeah, I'd consider it a bug. It comes from NSString.
-
-
@olebegemann@epaga Wow, that's almost JavaScript-bad!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Ole Begemann
Rafa Barberá
Chris
John Goering ن
Beat Bolli