Login Register






How to word wrap in batch filter_list
Author
Message
RE: How to word wrap in batch #10
(03-30-2013, 05:53 PM)noize Wrote:
(03-30-2013, 03:36 AM)ArkPhaze Wrote: Actually, the simple answer is you can, it's just hard to do. If you fool around with mode to set the number of columns then you should know how big your buffer is and how many chars can fit into a row. From there, you can probably loop through substrings of the variable for the text and count and decide where to split the words off. Although I'm not sure why you would take the time to do so...

Yes... well... that's not easy...
Maybe you could also do that by setting the text to variables and then using %var:~0,numberofcharsyouwantperline%. Anyhow, I can't think of a reason I would do that for.

That's almost just the same method that I just explained. Only doing it like that would be no different than the edge of the right buffer cutting off the text, since you are still measuring by chars not words...

Code:
set text=some words go here echo %text:~0,7%

"some wo" is not what the OP wants to see.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply





Messages In This Thread
How to word wrap in batch - by PInkleton - 03-26-2013, 05:17 AM
How to word wrap in batch - by PInkleton - 03-26-2013, 05:17 AM