A ViewList with string-specific methods.
There are no implemented interfaces.
There are no attributes in this class.
append(item, source=None, offset=0)
count(item)
disconnect()
Break link between this list and parent list.
extend(other)
get_2D_block(top, left, bottom, right, strip_indent=1)
get_indented(start=0, until_blank=0, strip_indent=1, block_indent=None, first_indent=None)
Extract and return a StringList of indented lines of text.
Collect all lines with indentation, determine the minimum indentation, remove the minimum indentation from all indented lines (unless strip_indent is false), and return them. All lines up to but not including the first unindented line will be returned.
Parameters: |
|
---|---|
Return: |
|
get_text_block(start, flush_left=0)
Return a contiguous block of text.
If flush_left is true, raise UnexpectedIndentationError if an indented line is encountered before the text block ends (with a blank line).
index(item)
info(i)
Return source & offset for index i.
insert(i, item, source=None, offset=0)
offset(i)
Return offset for index i.
pad_double_width(pad_char)
Pad all double-width characters in self by appending pad_char to each. For East Asian language support.
pop(i=-1)
remove(item)
replace(old, new)
Replace all occurrences of substring old with new.
reverse()
sort(*args)
source(i)
Return source for index i.
trim_end(n=1)
Remove items from the end of the list, without touching the parent.
trim_left(length, start=0, end=2147483647)
Trim length characters off the beginning of each item, in-place, from index start to end. No whitespace-checking is done on the trimmed text. Does not affect slice parent.
trim_start(n=1)
Remove items from the start of the list, without touching the parent.
There are no known subclasses.