Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to compress space in string?
Message
De
23/05/2003 05:13:33
 
 
À
23/05/2003 05:09:13
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00792083
Message ID:
00792104
Vues:
23
>>Agnes
>>
>>In this case I think you will need to use a loop to process the source string checking for consecutive spaces and remove them from a destination string?
>>
>>HTH
>
>Jos,
>
>this is my fear ::(
>

Agnes, just a thought. Processing your string in a loop from char 1 to char n will be faster (I think) then putting a StrTran() function in a loop with AT() as the loop condition as per your other posting.

This is because the StrTran() will need to parse the entire string each time and the AT() will need to parse a larger and larger portion of the string each time untill the end is reached. Processing the string one char at a time and building a new string I think is the fastest method.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform