Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strip Multiple Spaces
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00339153
Message ID:
00339253
Vues:
23
>>>In another language I work with there is a function that will replace multiple spaces with a single space. Is there one for VFP?
>>>
>>>TIA
>>
>>Alan,
>>
>>Not directly in VFP, however, the foxtools library has the function Reduce(). That will handle the removal of spaces appropriately. You might want to look at my Extended Foxtools Help File (under Coding, Syntax and Commands) available in the UT download section.
>
>Hmmm. We have interpretted his question in 2 very different ways. I wonder which one he was after, if either.

I don't think so, Mark. You used a field, I used a string.

If you're referring to my "...directly..." comment, I meant that you can't do it without calling at least one other function. For example, to use STRTRAN() to handle every case, you'd have to count the number words in the string, check for two or more spaces between them and so on. Reduce(), however, eliminates this.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform