Please turn on JavaScript in your browser and refresh the page to view its content.
Availability 有効性
Technology
On This Page この項には
var first: (T.Value?, U.Value?, V.Value?, W.Value?, X.Value?, Range<AttributedString.Index>)? { get }
Value
Range
AttributedString
Index
If the collection is empty, the value of this property is nil. コレクションが空であるならば、このプロパティはnilです。
nil
let numbers = [10, 20, 30, 40, 50] if let firstNumber = numbers.first { print(firstNumber) } // Prints "10"