mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Change @availability to @available.
This came out of today's language review meeting. The intent is to match #available with the attribute that describes availability. This is a divergence from Objective-C. Swift SVN r28484
This commit is contained in:
@@ -919,7 +919,7 @@ extension String {
|
||||
// @property NSUInteger length;
|
||||
|
||||
/// Returns the number of Unicode characters in the `String`.
|
||||
@availability(*, unavailable,
|
||||
@available(*, unavailable,
|
||||
message="Take the count of a UTF-16 view instead, i.e. str.utf16.count()")
|
||||
public var utf16Count: Int {
|
||||
return _ns.length
|
||||
@@ -1472,8 +1472,8 @@ extension String {
|
||||
url, atomically: useAuxiliaryFile, encoding: enc)
|
||||
}
|
||||
|
||||
@availability(iOS, introduced=9.0)
|
||||
@availability(OSX, introduced=10.11)
|
||||
@available(iOS, introduced=9.0)
|
||||
@available(OSX, introduced=10.11)
|
||||
public func stringByApplyingTransform(
|
||||
transform: String, reverse: Bool
|
||||
) -> String? {
|
||||
|
||||
Reference in New Issue
Block a user