74const c_whitespace =
"\t\n\013\014\r ";
78any sum (list la, *any start);
81string translate (
string text, hash table);
84string xsprintf (
string fmt, hash args);
169 string initial_indent =
"";
170 string subsequent_indent =
"";
171 bool expand_tabs = True;
172 bool replace_whitespace = True;
173 bool fix_sentence_endings = False;
174 bool break_long_words = True;
175 bool drop_whitespace = True;
176 bool break_on_hyphens = True;
179 string placeholder =
' [...]';
182 hash whitespace_trans;
184 string wordsep_simple_re;
185 string sentence_end_re;
189 constructor (*hash opts);
279 list _split_chunks (
string text);
319 list
wrap (
string text,
int width=70, *hash opts);
330 string fill (
string text,
int width=70, *hash opts);
346 string shorten (
string text,
int width, *hash opts);
351const c_whitespace_only_re =
'^[ \t]+$';
352const c_leading_whitespace_re =
'(^[ \t]*)(?:[^ \t\n])';
374 string indent (
string text,
string prefix, *code predicate);
Definition: TextWrap.qm.dox.h:165
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:69
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.