Omg, I hate spoon feeding like this, but I guess I'm going to have to...
You have a general idea how long your longest string is, let's say its 20 characters in length... so we use format to padd each string with (20-length of string) [twenty minus length of string] spaces, by using the formatting option %-20s .... This way, all strings are columnized underneath eachother in a proper fashion.....
%s $a thats what your doing in a way your makeing colums
then you add
% -20%s like the with of the colum becomes 20 .. but its not exactly what i am looking for realy sorry if i am making you feel unconfortable .. don't mean to .. realy realy sorry hehe could be wrong but i think that is what you do
yes and no looks like it but not exactly would be same as
[lrange [split $arg {}] 0 100]
i got a description of somethig in db and that description is one line but some descriptions have byte count of 500 - 1000
and others have bytecounts of 1 - 20
in those descriptions are words with byte count 1 - 60 and i just wana output a deasend text but if you use the format thing then its like some workds are pressed to eachother sometimes don't even see the space and some are spread out that you have to go look for the second word .. so i want to a make a loop that splits the word on the first space after byte count 100 ..
Check out string last (or first - depending on what you want) or string wordstart (or wordend). You should be able to make a word wrapping proc with one/more of these commands.
You might want to check this post. It's a word wrapping proc that splits the entire string and loops through the words. It doesn't split words that are too long to fit on a single line, though. But if you can live with that it should be just what you need. (I didn't do any speed tests to compare it to other methods of splitting because I'm too lazy right now, but it can't be that bad...it's fairly compact)