Module ROT.Text

Text tokenization and breaking routines.

Functions

measure (str, maxWidth) Measure size of a resulting text block.
tokenize (str, maxWidth) Convert string to a series of a formatting commands.
_breakInsideToken (tokens, tokenIndex, breakIndex, removeBreakChar) Create new tokens and insert them into the stream


Functions

measure (str, maxWidth)
Measure size of a resulting text block.

Parameters:

  • str
  • maxWidth
tokenize (str, maxWidth)
Convert string to a series of a formatting commands.

Parameters:

  • str
  • maxWidth
_breakInsideToken (tokens, tokenIndex, breakIndex, removeBreakChar)
Create new tokens and insert them into the stream

Parameters:

  • tokens table
  • tokenIndex number Token being processed
  • breakIndex number Index within current token's value
  • removeBreakChar boolean Do we want to remove the breaking character?

Returns:

    string remaining unbroken token value
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03