Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

trim/auto doesn't do anything?

 [1/4] from: anton::lexicon::net at: 5-Apr-2002 22:12


Usage of trim says: /auto -- Auto indents lines relative to first line. So I tried this:
>> trim/auto "AAA^/ BBB^/ CCC^/ DDD"
== {AAA BBB CCC DDD} I was expecting all the lines to be lined up. Is this normal? Anton.

 [2/4] from: g:santilli:tiscalinet:it at: 5-Apr-2002 21:25


Hi Anton, On Friday, April 05, 2002, 2:12:00 PM, you wrote: A> I was expecting all the lines to be lined up. A> Is this normal? Yup. Look:
>> trim/auto { AAA
{ BBB { CCC { DDD { } == {AAA BBB CCC DDD } Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [3/4] from: ingo:2b1 at: 5-Apr-2002 21:54


Hi Anton, what the help of trim/auto _means_ is, that the first line gets trimmed, and all subsequent lines get trimmed to the same amount, e.g. if three spaces had to be removed in the first line, there are never more than three spaces removed in the following lines. Now in your example, the first line could not be trimmed, so nothing changed at all.
>> t: { A^/ B^/ A}
== " A^/ B^/ A"
>> trim/auto t
== "A^/ B^/A" Kind regards, Ingo Am Fre, 2002-04-05 um 14.12 schrieb Anton:
> >> trim/auto "AAA^/ BBB^/ CCC^/ DDD" > == {AAA > BBB > CCC > DDD} > > I was expecting all the lines to be lined up.
P.S. That might be someting for 2.6: trim/align left aligns all lines

 [4/4] from: anton:lexicon at: 6-Apr-2002 12:42


I see, thanks guys. - Anton.