Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove excessive spaces in string
Message
De
28/07/2009 15:45:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
27/07/2009 13:39:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01414370
Message ID:
01415158
Vues:
49
>So, it's possible to reduce series of spaces (or any other characters) down to 1 with a fixed number of STRTRAN() calls:
>
>- up to and including 4,096 spaces with 7 STRTRAN() calls
>- up to and including 1,048,576 spaces with 9 STRTRAN() calls

I've always done this by

do while "{2**n spaces}"$string
string=strtran(...)
enddo

But now... if the limit to reduce() is 64K, I'd chop the string into pieces smaller than that, and reassemble the results. Should be faster than going it all in Fox.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform