Documentation | Build Status |
---|---|
This Julia package allows to wrap long lines of text to fit within a given width.
julia> text = "This text is going to be wrapped around in lines no longer than 20 characters.";
julia> println_wrapped(text, width=20)
This text is going
to be wrapped around
in lines no longer
than 20 characters.
The other exported functions are wrap
(returns a string) and print_wrapped
.
See the documentation for more advanced settings.
To install the module, use Julia's package manager: start pkg mode by pressing ] and then enter:
(v1.3) pkg> add TextWrap
Dependencies will be installed automatically. The module can then be loaded like any other Julia module:
julia> using TextWrap
- STABLE — most recently tagged version of the documentation.
- DEV — in-development version of the documentation.
- Correctly account for the width of each character using
textwidth
instead oflength
- Fix a bug with
subsequent_indent
- Improve recognition of ANSI escape codes
- Fixes for the
replace_whitespace=true
case
- Drop support for Julia versions v0.6/v0.7
- Recognize ANSI escape codes and by default don't count them in the width computations