阵列<字符串>
[串]
对我来说[String]在编码方面非常快,但实际上两者在编译器和性能方面有何不同,我们应该遵循哪一个?
解决方法 来自 Swift上的iOS开发者库…The type of a Swift array is written in full as Array< Element >,where
Element is the type of values the array is allowed to store. You can
also write the type of an array in shorthand form as [Element].
Although the two forms are functionally IDentical,the shorthand form
is preferred and is used throughout this guIDe when referring to the
type of an array.
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/CollectionTypes.html
总结以上是内存溢出为你收集整理的数组 – [String]和Array之间的区别全部内容,希望文章能够帮你解决数组 – [String]和Array之间的区别所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)