项目作者: carlobaldassi

项目描述 :
Julia package for wrapping text into paragraphs.
高级语言: Julia
项目地址: git://github.com/carlobaldassi/TextWrap.jl.git
创建时间: 2012-11-20T18:14:53Z
项目社区:https://github.com/carlobaldassi/TextWrap.jl

开源协议:Other

下载


TextWrap.jl

Documentation Build Status

This Julia package allows to wrap long lines of text to fit within a given width.

Quick example

  1. julia> text = "This text is going to be wrapped around in lines no longer than 20 characters.";
  2. julia> println_wrapped(text, width=20)
  3. This text is going
  4. to be wrapped around
  5. in lines no longer
  6. 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:

  1. (v1.3) pkg> add TextWrap

Dependencies will be installed automatically.
The module can then be loaded like any other Julia module:

  1. julia> using TextWrap

Documentation

  • STABLEmost recently tagged version of the documentation.
  • DEVin-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