Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing embedded spaces
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00561036
Message ID:
00561045
Vues:
33
cStringIn = 'Peter the embedded      space    man'
cStringOut = cStringIn 

do while .T.

   if space(2) $ cStringOut
       cStringOut = strtran( cStringOut, space(2), space(1) )
   else
       exit
   endif

enddo

? cStringOut
>Hello All,
>easy peasy one for you experts, I need a function to remove extraneous embedded spaces from a given string of multiple words, and wondered if any of you have experience in this area, an example of I show below
>
>

>cStringIn = 'Peter the embedded space man'
>
>
>cStringOut = 'Peter the embedded space man'
>
>

>
>
>
>many thanks
>
>Pete Kane
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform