ScriptClassifier
public class ScriptClassifier
This class implements UAX #24 available at http://www.unicode.org/reports/tr24.
-
Creates a script classifier for the specified string.
Declaration
Swift
public init(string: String)Parameters
stringThe string whose script classification is desired.
-
The string that the script classifier was created for.
Declaration
Swift
public let string: String -
The resolved scripts of all characters in source string.
Declaration
Swift
public var characterScripts: CharacterScripts { get } -
Returns a sequence of resolved script runs within the specified UTF-16 range of source string.
Declaration
Swift
public func scriptRuns(forCodeUnitRange codeUnitRange: Range<Int>) -> RunSequenceParameters
codeUnitRangeThe UTF-16 range in source string.
Return Value
A sequence of script runs within the specified UTF-16 range of source string.
-
Returns a sequence of resolved script runs within the specified character range of source string.
Declaration
Swift
public func scriptRuns(forCharacterRange characterRange: Range<String.Index>) -> RunSequenceParameters
characterRangeThe character range in source string.
Return Value
A sequence of script runs within the specified character range of source string.
-
A collection of the scripts of a string, represented by UTF-16 code unit indices.
See moreDeclaration
Swift
public struct CharacterScripts : RandomAccessCollection
View on GitHub
Install in Dash
ScriptClassifier Class Reference