How can I get the length of a String in Swift 2.0? -
so far was:
let string = "my example string" if count(string) >= 3 { ... }
but error:
count
unavailable: accesscount
property on collection. typestring
doesn't conform protocolcollectiontype
oh, simple:
string.characters.count
Comments
Post a Comment