>>If you're looking for a one-liner, here's one.
lcStr = "This is a string with spaces"
>>? EVALUATE(REPLICATE([STRTRAN(], CEILING(LEN(lcStr) / 2)) + [lcStr] + ;
>> REPLICATE([, SPACE(2), SPACE(1))], CEILING(LEN(lcStr) / 2)))
>
>Thanks, this is working perfectly.
You're welcome.
I would recomend that you use
CEILING(SQRT(OCCURS(SPACE(1),lcStr)))) to make overall size of the expression shorter. With long source string you could exceed 8,192 characters limit on the command line size.
--sb--