Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible bug
Message
De
27/12/2001 14:59:06
 
 
À
27/12/2001 14:34:53
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00598533
Message ID:
00598543
Vues:
23
Yes...
You have missed something.

try the following code to see the result:
?OCCURS(SPACE(2),strtran(space(1)+'a'+space(2)+'b'+space(3)+'c'+space(4)+'d',space(2),space(1)))
Strtran works only from left-to-right and replaces the first occurance of overlaping strings
so
?len(strtran(space(3),space(2),space(1)))
will say '2' which is correct:
two spaces replaced by one + one remaining space.

To clear all dublicates of spaces run strtran in a cycle, till the length of the string is not changed from that before the strtran

Best wishesh
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform