CharacterScripts
public struct CharacterScripts : RandomAccessCollection
A collection of the scripts of a string, represented by UTF-16 code unit indices.
-
The index to the first element.
Declaration
Swift
public var startIndex: Int { get } -
The index after the last element.
Declaration
Swift
public var endIndex: Int { get } -
Accesses the embedding level at the specified character index.
Declaration
Swift
public subscript(index: String.Index) -> Script { get }Parameters
indexA valid character index of the source string.
-
Accesses the script at the specified position.
Declaration
Swift
public subscript(index: Int) -> Script { get }Parameters
indexThe position of the element to access.
indexmust be greater than or equal tostartIndexand less thanendIndex.
View on GitHub
Install in Dash
CharacterScripts Structure Reference