Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chrtran() applied selectively
Message
From
05/06/2016 19:45:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/06/2016 15:16:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01636985
Message ID:
01637028
Views:
93
>>>>>If you have been able to locate the error portion, use something like
>>>>>
>>>>> substr(mstr,1 , pos-1) + '.' + substr(mstr, pos+1)
>>>>>
>>>>
>>>>
>>>>minimally faster and for my eyes easier to read...
>>>>
>>>> left(mstr, pos-1) + '.' + substr(mstr, pos+1)
>>>>
>>>
>>>
>>>STUFF(mstr,pos,1,'.')
>>>
>>
>>yupp, forgot that one, which is better
>
>would this not ADD the dot to whatever is already there??

No it won't - the 3rd parameter is the number of characters to replace/remove (the replacing string doesn't have to be the same length, so you can remove 2 and insert 23, or any other combination. Including zero, when it removes none - then it's an insert.

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