为什么某些 Swift 标准库函数在 playground 中无法识别?

Why are some Swift standard library functions not recognized in playground?

有一个叫做countElements()的函数,它应该是Swift中的标准库函数(该函数出现在当前Swift 2.0的第160页'The Swift Programming Language').

的更新版本

那么,下面的代码难道不能正常工作吗?

在 Swift 2.0 中,不再有 countElements(...) 方法。请改用 stringA.characters.countcharacters returns 字符串中的字符数组,count returns 字符数组中的项目数。

文档:https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/StringsAndCharacters.html#//apple_ref/doc/uid/TP40014097-CH7-ID297