73const c_whitespace =
"\t\n\013\014\r ";
77any sum (list la, *any start);
80string translate (
string text, hash table);
83string xsprintf (
string fmt, hash args);
168 string initial_indent =
"";
169 string subsequent_indent =
"";
170 bool expand_tabs = True;
171 bool replace_whitespace = True;
172 bool fix_sentence_endings = False;
173 bool break_long_words = True;
174 bool drop_whitespace = True;
175 bool break_on_hyphens = True;
178 string placeholder =
' [...]';
181 hash whitespace_trans;
183 string wordsep_simple_re;
184 string sentence_end_re;
188 constructor (*hash opts);
278 list _split_chunks (
string text);
318 list
wrap (
string text,
int width=70, *hash opts);
329 string fill (
string text,
int width=70, *hash opts);
345 string shorten (
string text,
int width, *hash opts);
350const c_whitespace_only_re =
'^[ \t]+$';
351const c_leading_whitespace_re =
'(^[ \t]*)(?:[^ \t\n])';
373 string indent (
string text,
string prefix, *code predicate);
Definition: TextWrap.qm.dox.h:164
list wrap(string text)
Wrap a single paragraph of text, returning a list of wrapped lines.
_handle_long_word(reference reversed_chunks, reference cur_line, int cur_len, int width)
list _wrap_chunks(list chunks)
string fill(string text)
Fill a single paragraph of text, returning a new string.
string _munge_whitespace(string text)
_fix_sentence_endings(reference chunks)
Main namespace for all public symbols in the TextWrap module.
Definition: TextWrap.qm.dox.h:68
string dedent(string text)
Remove any common leading whitespace from every line in 'text'.
list wrap(string text, int width=70, *hash opts)
Wrap a single paragraph of text, returning a list of wrapped lines.
string indent(string text, string prefix, *code predicate)
Adds 'prefix' to the beginning of selected lines in 'text'.
string shorten(string text, int width, *hash opts)
Collapse and truncate the given text to fit in the given width.
string fill(string text, int width=70, *hash opts)
Fill a single paragraph of text, returning a new string.
string expandtabs(string text, int tabsize=8)
Return a copy of the string where all tab characters are expanded using spaces.