Please turn on JavaScript in your browser and refresh the page to view its content.
Availability
Technology
On This Page この項には
var first: String.UTF16View.Element? { get }
String
UTF16View
Element
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"