mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user