Module ftext

fText processing

Functions

wordWrap (str, limit) Performs wordwrapping on a string, given a length limit.
xwrap (text, limit, type) Performs wordwrapping on a string, while ignoring color tags of a given type.
fText (str, opts) The main course, this function returns a formatted string, based on a table of options


Functions

wordWrap (str, limit)
Performs wordwrapping on a string, given a length limit. Does not understand colour tags and will count them as characters in the string

Parameters:

  • str string the string to wordwrap
  • limit number the line length to wrap at
xwrap (text, limit, type)
Performs wordwrapping on a string, while ignoring color tags of a given type.

Parameters:

  • text string the string you are wordwrapping
  • limit number the line length to wrap at
  • type string What type of color codes to ignore. 'c' for cecho, 'd' for decho, 'h' for hecho, and anything else or nil to pass the string on to wordWrap
fText (str, opts)
The main course, this function returns a formatted string, based on a table of options

Parameters:

  • str string the string to format
  • opts table the table of options which control the formatting
generated by LDoc 1.4.6 Last updated 2020-06-14 21:39:03