Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
docutils.statemachine.StringList Class Reference
Inheritance diagram for docutils.statemachine.StringList:
Inheritance graph
[legend]
Collaboration diagram for docutils.statemachine.StringList:
Collaboration graph
[legend]

Public Member Functions

 trim_left (self, length, start=0, end=sys.maxsize)
 
 get_text_block (self, start, flush_left=False)
 
 get_indented (self, start=0, until_blank=False, strip_indent=True, block_indent=None, first_indent=None)
 
 get_2D_block (self, top, left, bottom, right, strip_indent=True)
 
 pad_double_width (self, pad_char)
 
 replace (self, old, new)
 
- Public Member Functions inherited from docutils.statemachine.ViewList
 __init__ (self, initlist=None, source=None, items=None, parent=None, parent_offset=None)
 
 __str__ (self)
 
 __repr__ (self)
 
 __lt__ (self, other)
 
 __le__ (self, other)
 
 __eq__ (self, other)
 
 __ne__ (self, other)
 
 __gt__ (self, other)
 
 __ge__ (self, other)
 
 __contains__ (self, item)
 
 __len__ (self)
 
 __getitem__ (self, i)
 
 __setitem__ (self, i, item)
 
 __delitem__ (self, i)
 
 __add__ (self, other)
 
 __radd__ (self, other)
 
 __iadd__ (self, other)
 
 __mul__ (self, n)
 
 __imul__ (self, n)
 
 extend (self, other)
 
 append (self, item, source=None, offset=0)
 
 insert (self, i, item, source=None, offset=0)
 
 pop (self, i=-1)
 
 trim_start (self, n=1)
 
 trim_end (self, n=1)
 
 remove (self, item)
 
 count (self, item)
 
 index (self, item)
 
 reverse (self)
 
 sort (self, *args)
 
 info (self, i)
 
 source (self, i)
 
 offset (self, i)
 
 disconnect (self)
 
 xitems (self)
 
 pprint (self)
 

Public Attributes

 data
 
- Public Attributes inherited from docutils.statemachine.ViewList
 data
 
 items
 
 parent
 
 parent_offset
 

Detailed Description

A `ViewList` with string-specific methods.

Member Function Documentation

◆ get_indented()

docutils.statemachine.StringList.get_indented (   self,
  start = 0,
  until_blank = False,
  strip_indent = True,
  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:
  - `start`: The index of the first line to examine.
  - `until_blank`: Stop collecting at the first blank line if true.
  - `strip_indent`: Strip common leading indent if true (default).
  - `block_indent`: The indent of the entire block, if known.
  - `first_indent`: The indent of the first line, if known.

:Return:
  - a StringList of indented lines with minimum indent removed;
  - the amount of the indent;
  - a boolean: did the indented block finish with a blank line or EOF?

◆ get_text_block()

docutils.statemachine.StringList.get_text_block (   self,
  start,
  flush_left = False 
)
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).

◆ pad_double_width()

docutils.statemachine.StringList.pad_double_width (   self,
  pad_char 
)
Pad all double-width characters in `self` appending `pad_char`.

For East Asian language support.

◆ replace()

docutils.statemachine.StringList.replace (   self,
  old,
  new 
)
Replace all occurrences of substring `old` with `new`.

◆ trim_left()

docutils.statemachine.StringList.trim_left (   self,
  length,
  start = 0,
  end = sys.maxsize 
)
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.

The documentation for this class was generated from the following file: