Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible bug
Message
From
27/12/2001 14:59:06
 
 
To
27/12/2001 14:34:53
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00598533
Message ID:
00598543
Views:
26
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!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform