Search code examples
c++textword-wrapreflow

Is there a libraray/method for 80 column formatted text output?


Here is what I'm looking for.

I'd like to find a library or method that formats output text, such that it word wraps at 80 columns (or user configurable), and allows user defined indentation.

I know that I could create one, but I suspect that there is already a library available that does this. I've googled around and I've found pages for iomanip -- which gave me ideas for creating my own.

I've done a cursory search through the boost libraries, but I didn't really find anything that quite matched.


Solution

  • Here it is, search harder next time ;)

    2.2.4. Line-Wrapping Filters

    http://www.boost.org/doc/libs/1_47_0/libs/iostreams/doc/tutorial/line_wrapping_filters.html