Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Misleading message
Message
 
 
À
21/07/2002 16:51:26
Information générale
Forum:
Level Extreme
Catégorie:
Autre
Divers
Thread ID:
00680604
Message ID:
00680951
Vues:
27
>>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform