Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STRTRAN no matter the case
Message
De
25/09/1997 16:45:11
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
STRTRAN no matter the case
Divers
Thread ID:
00051670
Message ID:
00051670
Vues:
77
Thanks to Edward and Marc for having helped me in the STRTRAN to replace everything no matter what the case is.

Here's the function I built to solve this:
CheckIt('michel','notes')

FUNCTION CheckIt
* expC1 Text to replace
* expC2 Name of the memo field
PARAMETER tcText,tcMemo
LOCAL lcText
LOCAL lnPosition
lnPosition=ATC(tcText,&tcMemo)
DO WHILE lnPosition>0
   lcText=SUBSTR(&tcMemo,lnPosition,LEN(tcText))

   * Replace the memo field temporary with a string you can be sure is not part of it
   REPLACE (tcMemo) WITH STRTRAN(&tcMemo,lcText,'UNIVERSALTHREADONTOP')

   lnPosition=ATC(tcText,&tcMemo)
ENDDO

* Now, lets do the final replace
REPLACE (tcMemo) WITH STRTRAN(&tcMemo,'UNIVERSALTHREADONTOP',tcText)
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform