Name
pcontext:Itemize -- check if context is invalid
Synopsis
list = pcontext:Itemize(text$, start_index, length, attrs[, base_dir])
Function
Breaks a piece of text into segments with consistent directional level and font. Each byte of text will be contained in exactly one of the items in the returned list. The generated list of items will be in logical order (the start offsets of the items are ascending).

Optionally, you can specify the base direction in the base_dir argument. The base direction is used when computing bidirectional levels. If base_dir is omitted, the base direction will be obtained from the context. See pcontext:SetBaseDir() for a list of base directions.

Note that you must free the individual Pango items in the list using pitem:Free().

Inputs
text$
the text to itemize
start_index
first byte in text to process
length
the number of bytes (not characters) to process after start_index. This must be >= 0
attrs
a Pango attribute list containing the set of attributes that apply to text
base_dir
optional: base direction to use for bidirectional processing
Results
list
a table containing a list of Pango items; the caller is responsible for freeing each item using pitem:Free()

Show TOC