x = 'test1 test2 test3 test4 test5 test6'
>>>x = 'test1 test2 test3 test4 test5 test6'
>>>>>x = 'test1 test2 test3 test4 test5 test6' >> >>x = STRTRAN( x, SPACE( 8 ), SPACE( 1 ) ) >>x = STRTRAN( x, SPACE( 8 ), SPACE( 1 ) ) >>x = STRTRAN( x, SPACE( 4 ), SPACE( 1 ) ) >>x = STRTRAN( x, SPACE( 4 ), SPACE( 1 ) ) >>x = STRTRAN( x, SPACE( 2 ), SPACE( 1 ) ) >>x = STRTRAN( x, SPACE( 2 ), SPACE( 1 ) ) >> >>?x >>* Above handles up to 64 spaces ( 8 x 8 ) >>* Adding 2 more lines at the top with SPACE( 16 ) would increase capacity to 256 spaces ( 16 x 16 ) >>* etc. >> >>* I suspect the FoxTools REDUCE() function may be a recursive implementation of the above >>>
>x = 'test1 test2 test3 test4 test5 test6' >DO WHILE SPACE(2) $ x > x = STRTRAN(x, ' ', ' ') >ENDDO >Turns out I had a bug in my test code that made both our techniques look better than they actually are. See my second reply to Naomi.