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