Rand Stats

Text::Wrap

zef:jkramer

Actions Status Actions Status Actions Status

NAME

Text::Wrap - Wrap texts.

SYNOPSIS

use Text::Wrap;

say wrap-text($some-long-text);
say wrap-text($some-long-text, :width(50));
say wrap-text($some-long-text, :paragraph(rx/\n/));
say wrap-text($text-with-very-long-word, :hard-wrap);

DESCRIPTION

Text::Wrap provides a single function wrap-text that takes arbitrary text and wraps it to form paragraphs that fit the given width. There are three optional arguments that modify its behavior.

AUTHOR

Jonas Kramer jkramer@mark17.net

COPYRIGHT AND LICENSE

Copyright 2016, 2024 Jonas Kramer.

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.