[stdlib] Remove String.compare()

This was added for benchmarking purposes, without the realization that
it conflicts with the NSString API we adopt when importing Foundation.
http://oleb.net/blog/2014/07/swift-strings/#comparing-strings describes
the problem.

Fixes <rdar://problem/17800504>

Swift SVN r20517
This commit is contained in:
Dave Abrahams
2014-07-24 21:29:48 +00:00
parent ec6016040e
commit e00e41af39
2 changed files with 22 additions and 25 deletions

View File

@@ -222,9 +222,6 @@ extension String {
self = String(view._core)
}
public func compare(other : String) -> Int {
return(UnicodeScalarView(_core).compare(UnicodeScalarView(other._core)))
}
public var unicodeScalars : UnicodeScalarView {
return UnicodeScalarView(_core)
}