[swift-evolution] Change Request: Make myString.hasPrefix("") and myString.hasSuffix("") return true

Dave Abrahams dabrahams at apple.com
Mon Jul 18 17:29:16 CDT 2016


on Mon Jul 18 2016, Kevin Nattinger <swift-evolution at swift.org> wrote:

> I agree, true is definitely the expected behavior. In particular, it
> seems absurd to me that `a.hasPrefix(b)` and `a.hasSuffix(b)` could be
> false when `a == b` is true.

I expect to be reworking Strings for Swift 4, and this is one of the
many things we plan to address.

-- 
Dave



More information about the swift-evolution mailing list