Any plans to match the String methods as seen in Xcode 9?

Lately, I have been working on a few projects written in Swift using Xcode 9 at work. I have been trying to bring over some simple business logic of to my experiment project in Fire. I only noticed that some things aren’t available which you would expect. Could this be Swift 4 changes which aren’t supported yet?

For example, I have the following lines of code which are failing:

let chunks = query.components(separatedBy: " ") with No such member

let trimmedLeftover = leftover.trimmingCharacters(in: .whitespacesAndNewlines) with No such member
I have a look at CharacterSet and it looks they aren’t imported correctly but as whitespaceAndNewlineCharacterSet instead. Woud this be possible to be improved?

let tokens: [Token] = chunks.flatMap { chunk -> Token? in with closing bracket expected I don’t get why the closing bracket is available at the end of this closure code

I think it would be nice to have the lovely String related functionality available to Silver

Eventually, yes. problem is Apple keeps changing every (what feels like) three weeks.

That said, you can add them yourself if you’d like, Pull requests for http://github.com/remobjects/SwiftBaseLibrary/ would be really appreciated.

I will have a closer look at the repository :slight_smile:

1 Like