WRAP2
Break Up Long Lines in a File


WRAP2 is an executable C++ program that reads a file and makes a copy in which long lines have been broken up. A line is "wrapped" if its length would exceed a given maximum. Unlike the WRAP program, this program will wrap the line before the maximum length is reached, if that will help avoid breaking up words.

Related Data and Programs:

CR2LF is a C++ program which reads a text file and replaces carriage returns by line feeds.

CRRM is a C++ program which reads a text file and writes a copy which has no carriage returns.

DEBLANK is a C++ program which makes a copy of a text file in which blank lines have been removed.

DECOMMENT is a C++ program which makes a copy of a text file which contains no "comment" lines (that begin with "#").

FILUM is a library of C++ routines for performing various operations on files.

REFORMAT is a FORTRAN90 program which reads a file that contains only real values, and writes a copy which has a fixed number of real values on each line.

REWORD is a C++ program which makes a copy of a file in which each line has the same number of "words".

UNCONTROL is a C++ program which makes a copy of a text file which contains no control characters.

WRAP is a C++ program which makes a copy of a text file in which long lines have been wrapped.

Usage:

wrap2 file1 file2 wrap_length
reads the lines of file1, writing copies of the lines to file2, breaking the lines if necessary so that they are never longer than wrap_length characters.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the C++ source codes.


Last revised on 27 March 2007.