Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chrtran() applied selectively
Message
De
05/06/2016 19:45:14
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01636985
Message ID:
01637028
Vues:
101
>>>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform