Accesses the Unicode scalar value at the given position.
SDK
- Xcode 7.1+
Framework
- Swift Standard Library
Declaration
Parameters
position
A valid index of the character view.
position
must be less than the view’s end index.
Discussion
The following example searches a string’s Unicode scalars view for a capital letter and then prints the character and Unicode scalar value at the found index: