line length Algorithm

In typography, line length is the width of a block of typeset text, normally quantify in units of length like inches or points or in characters per line (in which case it is a measure).In a ragged right setting line lengths vary to make a ragged right edge of lines changing in length.

line length source code, pseudocode and analysis