Accesses the code unit at the given position.
SDK
- Xcode 7.1+
Framework
- Swift Standard Library
Declaration
Parameters
position
A valid index of the view.
position
must be less than the view’s end index.
Discussion
The following example uses the subscript to print the value of a string’s first UTF-8 code unit.