Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single occurrence in a string
Message
From
30/03/2015 09:09:32
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
 
 
To
27/03/2015 13:36:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01617326
Message ID:
01617391
Views:
66
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... :)
Previous
Reply
Map
View

Click here to load this message in the networking platform