Text::...::Wrap(3pm)

πŸ“¦
version 0.22 Β· 6 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Text::ASCIITable::Wrap β€” literally just here to wrap your text πŸ’–

Okay bestie, so this is Text::...::Wrap(3pm) from the User Contributed Perl Documentation section, and it's the little module that makes sure your text behaves. Slay.


🌸 SHORT DESCRIPTION 🌸

It makes sure a text never gets wider than the width you specified, using wordwrap. That's it, that's the whole job, and it does it beautifully πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

  use Text::ASCIITable::Wrap qw{ wrap };
  print wrap('This is a long line which will be cut down to several lines',10);

Look at her. Iconic. You import wrap, you hand her a long string and a number, she hands you back something tidy. No cap. ✨


πŸ¦‹ FUNCTIONS πŸ¦‹

wrap($text,$width[,$nostrict]) (exportable)

She wraps your $text at the $width you asked for. That's the main character job right there.

Now, unless you set the $nostrict parameter, she will cut a word down if that word is wider than $width β€” so if a single word is just too long to fit, she's not gonna let it ruin the whole vibe, she'll chop it. 😭 (That's the strict behaviour, and it's the default, so if you don't pass $nostrict you're getting the chopping.)

Also β€” good news β€” she supports text with linebreaks too. 🫢


πŸ’œ REQUIRES πŸ’œ

  • Exporter
  • Carp

πŸ‘‘ AUTHOR πŸ‘‘

HXkon NessjXen, lunatic@cpan.org


🌈 VERSION 🌈

Current version is 0.2. ✨


Copyright 2002-2003 by HXkon NessjXen. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Fr fr, go wild within the rules. πŸ’…


⭐ SEE ALSO ⭐

  • Text::ASCIITable
  • Text::Wrap

Okay so like, go forth and wrap responsibly bestie πŸŽ€

This little love letter shipped as part of perl v5.36.0 on 2022-10-13 β€” and that's the whole page, periodt. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from