lib.string_helpers.*

Provides

lib.string_helpers.quote(code)[source]

Quote code

Parameters:

code (str) – Code to be quoted

Return type:

str

Returns:

Quoted code if not already quoted and quoting possible

lib.string_helpers.wrap_text(text, width=80, maxlen=2000)[source]

Wrap text to line width

Parameters:
  • text – The text to be wrapped

  • width – Width of the text to be wrapped

  • maxlen – Maximum total text length before text in truncated and extended by […]. If None then truncation is disabled.

Returns:

Wrapped text