Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chrtran() applied selectively
Message
From
07/06/2016 05:51:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
07/06/2016 03:28:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01636985
Message ID:
01637048
Views:
55
>>>>
>>>>Hi Karen:
>>>>
>>>>Another solution here :D
>>>>
>>>>Considering that there are always three "parts" separated by ":" symbol, this will do it in pure VFP:
>>>>
>>>>
>>>>mstr='1st-title: ANAME-HER : 3520931 place[21-22]'
>>>>? GETWORDNUM(mstr, 1, ':') + ':' + GETWORDNUM(mstr, 2, ':') + ':' + CHRTRAN(GETWORDNUM(mstr, 3, ':'), '-', '.')
>>>>
>>>
>>>
>>>Yes, but it turns out that the hyphen is not always a hyphen
>>
>>...and in that case you add all the symbols you want to replace in the 1st part. What is the problem? I don't see it
>
>I'm always careful. You may end up replacing too many chars

Just in the third part... like this:
+ CHRTRAN(GETWORDNUM(mstr, 3, ':'), '-=_', '...')

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform