https://github.com/carlobaldassi/textwrap.jl
Julia package for wrapping text into paragraphs.
https://github.com/carlobaldassi/textwrap.jl
julia textwrap
Last synced: about 2 months ago
JSON representation
Julia package for wrapping text into paragraphs.
- Host: GitHub
- URL: https://github.com/carlobaldassi/textwrap.jl
- Owner: carlobaldassi
- License: other
- Created: 2012-11-20T18:14:53.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-05-10T10:33:39.000Z (about 1 year ago)
- Last Synced: 2025-03-27T08:45:20.525Z (2 months ago)
- Topics: julia, textwrap
- Language: Julia
- Homepage:
- Size: 252 KB
- Stars: 16
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TextWrap.jl
| **Documentation** | **Build Status** |
|:-------------------------------------------------------------------------:|:------------------------------------------------------------:|
| [![][docs-stable-img]][docs-stable-url] [![][docs-dev-img]][docs-dev-url] | [![][travis-img]][travis-url][![][codecov-img]][codecov-url] |This [Julia] package allows to wrap long lines of text to fit within a given width.
### Quick example
```
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.### Installation
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
```### Documentation
- [**STABLE**][docs-stable-url] — **most recently tagged version of the documentation.**
- [**DEV**][docs-dev-url] — *in-development version of the documentation.*## Changes in release 1.0.2
* Correctly account for the width of each character using `textwidth` instead of `length`
* Fix a bug with `subsequent_indent`## Changes in release 1.0.1
* Improve recognition of ANSI escape codes
* Fixes for the `replace_whitespace=true` case## Changes in release 1.0.0
* Drop support for Julia versions v0.6/v0.7
* Recognize ANSI escape codes and by default don't count them in the width computations[Julia]: http://julialang.org
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://carlobaldassi.github.io/TextWrap.jl/stable
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://carlobaldassi.github.io/TextWrap.jl/dev[travis-img]: https://travis-ci.com/carlobaldassi/TextWrap.jl.svg?branch=master
[travis-url]: https://travis-ci.com/carlobaldassi/TextWrap.jl[codecov-img]: https://codecov.io/gh/carlobaldassi/TextWrap.jl/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/carlobaldassi/TextWrap.jl