ScriptIterProtocol

public protocol ScriptIterProtocol

A PangoScriptIter is used to iterate through a string and identify ranges in different scripts.

The ScriptIterProtocol protocol exposes the methods and properties of an underlying PangoScriptIter instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see ScriptIter. Alternatively, use ScriptIterRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying PangoScriptIter instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • script_iter_ptr Default implementation

    Typed pointer to the underlying PangoScriptIter instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the PangoScriptIter instance.

    Declaration

    Swift

    var script_iter_ptr: UnsafeMutablePointer<PangoScriptIter>! { get }
  • Required Initialiser for types conforming to ScriptIterProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ScriptIter Record: ScriptIterProtocol extension (methods and fields)

  • free() Extension method

    Frees a PangoScriptIter.

    Declaration

    Swift

    @inlinable
    func free()
  • getRange(start:end:script:) Extension method

    Gets information about the range to which iter currently points.

    The range is the set of locations p where *start <= p < *end. (That is, it doesn’t include the character stored at *end)

    Note that while the type of the script argument is declared as PangoScript, as of Pango 1.18, this function simply returns GUnicodeScript values. Callers must be prepared to handle unknown values.

    Declaration

    Swift

    @inlinable
    func getRange(start: UnsafeMutablePointer<UnsafePointer<CChar>?>! = nil, end: UnsafeMutablePointer<UnsafePointer<CChar>?>! = nil, script: UnsafeMutablePointer<PangoScript>! = nil)
  • next() Extension method

    Advances a PangoScriptIter to the next range.

    If iter is already at the end, it is left unchanged and false is returned.

    Declaration

    Swift

    @inlinable
    func next() -> Bool