Function
docutils.statemachine.string2lines

Signature

string2lines(astring, tab_width=8, convert_whitespace=0, whitespace=<_sre.SRE_Pattern object at 0x41f88570>)

Documentation String

Return a list of one-line strings with tabs expanded, no newlines, and trailing whitespace stripped.

Each tab is expanded with between 1 and tab_width spaces, so that the next character's index becomes a multiple of tab_width (8 by default).

Parameters:

  • astring: a multi-line string.
  • tab_width: the number of columns between tab stops.
  • convert_whitespace: convert form feeds and vertical tabs to spaces?