Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Single occurrence in a string
Message
De
30/03/2015 09:09:32
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
27/03/2015 13:36:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01617326
Message ID:
01617391
Vues:
64
Your code won't work in this case :)

Bigstring = 'cattttccvtttt'


>The simplest way would be to loop through the big string and check if the current character is already in the result. If not, add it.
>
lpara tcBig
>c=""
>for i=1 to len(tcBig)
>   ch=subs(tcbig, i, 1)
>   if not ch$c
>      c=c+ch
>  endif
>endfor
>return c
update: wow mine code either... :)

my code just a bad copy of yours. I'm another Code Hood... :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform