ScriptIter
- class ScriptIter(**kwargs)
- Constructors:
new(text:str, length:int) -> Pango.ScriptIter
Constructors
- class ScriptIter
- classmethod new(text: str, length: int) ScriptIter
Create a new
PangoScriptIter
, used to break a string of Unicode text into runs by Unicode script.No copy is made of
text
, so the caller needs to make sure it remains valid until the iterator is freed withfree
.Added in version 1.4.
- Parameters:
text – a UTF-8 string
length – length of
text
, or -1 iftext
is nul-terminated
Methods
- class ScriptIter
-
- get_range() tuple[str, str, Script]
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 asPangoScript
, as of Pango 1.18, this function simply returnsGUnicodeScript
values. Callers must be prepared to handle unknown values.Added in version 1.4.