The first element of the collection.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
Discussion
If the collection is empty, the value of this property is nil
.
The first element of the collection.
SDK
Framework
If the collection is empty, the value of this property is nil
.
subscript(String .Index) -> Character
Accesses the character at the given position.
var last: Character?
The last element of the collection.
func random Element() -> Character?
Returns a random element of the collection.
func random Element<T>(using: inout T) -> Character?
Returns a random element of the collection, using the given generator as a source for randomness.