Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Misleading message
Message
 
 
To
21/07/2002 16:51:26
General information
Forum:
Level Extreme
Category:
Other
Miscellaneous
Thread ID:
00680604
Message ID:
00680951
Views:
26
>>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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform