Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single occurrence in a string
Message
From
06/04/2015 14:37:44
 
 
To
02/04/2015 15:32:14
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:
01617827
Views:
97
>>Hi All:
>>
>>How do I remove duplicate characters in a string:
>>
>>
>>Bigstring = 'cattttccv'
>>NonDupeString = NonDupe(BigString)
>>
>>* Result = 'catv'
>>
>>
>>Thanks,
>>
>>Yossi
>
>FWLIW, My VFP solution, after reading Dragan's, was the same as Walter's except that I used CHRTRAN rather than STRTRAN.
>
>My last APL coding was back in 1984. I've been trying to work out a solution, but I've forgotten too much.
>So far all I can come up with is
>
>teststring <-  teststring[< gradeup > teststring]  
>bitmap <-  !=\teststring 
>result <- bitmap / teststring.
>
>(not sure if I remember exactly how not equal scan works. I "think" (hope) it gives a 1 when the values change.
>
>Of course, if it were real APL it would be in one line
>
>
>But I think I would be able to understand the real solution when I see it.
>
>(Sorry Craig. I don't have the keyboard to show the proper glyphs for you)

Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform