After the latest upgrade of Swift 1.2, I can't figure out how to split a line of text into words. I used to do this:
let bits = split(value!, { $0 == " "}, maxSplit: Int.max, allowEmptySlices: false)
But that no longer works, because...
Cannot invoke 'split' with an argument list of type '(String, (_) -> _, maxSplit: Int, allowEmptySlices: Bool)'
Ummm, ok, even though I could last build? Well whatever, let's try...
let bits = split(value!, { $0 == " "})
Well that and every other version I can think of ends up saying:
Missing argument for parameter 'isSeparator' in call
Let's hear it for beta-testing new programming languages! Yay!
Anyone know the correct secret sauce for 1.2?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…