Text Flow (like word wrapping to a margin) of free form text lines
Posted: 01 Apr 2016 14:29
I have an application control file in text format from which I use FINDSTR head and tail routines to extract freeform text comments from this:The output of the three comment lines flowed to column 50 would look like this:Does anyone know if a similar batch function has already been invented?
If not, I can see working through the words on these three lines and applying width tracking logic similar to one of my previous posts http://www.dostips.com/forum/viewtopic.php?p=44258#p44258 to a right margin.
Having done that, some doubling of interior white space could make the output right justified as well like: Is there anything out there that could do parts of this? Or a different approach?
John A.
Code: Select all
[Mouse]
AutoScrl=3
[Comment]
This INI file is customized for John's 'Bride of Frankenstein' PC system
featuring best visibility on the Flatron monitor using 1680 x 1050 resolution.
The File manager is colorized neutrally to remind use of system install
[Keyword]
This comment should not appear once the Head and Tail routines work
Code: Select all
This INI file is customized for John's 'Bride of
Frankenstein' PC system featuring best visibility
on the Flatron monitor using 1680 x 1050
resolution. The File manager is colorized
neutrally to remind use of system install
If not, I can see working through the words on these three lines and applying width tracking logic similar to one of my previous posts http://www.dostips.com/forum/viewtopic.php?p=44258#p44258 to a right margin.
Having done that, some doubling of interior white space could make the output right justified as well like:
Code: Select all
This INI file is customized for John's 'Bride of
Frankenstein' PC system featuring best visibility
on the Flatron monitor using 1680 x 1050
resolution. The File manager is colorized
neutrally to remind use of system install
John A.