Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strtran preserving case
Message
 
 
À
20/08/2009 10:29:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01419229
Message ID:
01419245
Vues:
56
>>Hi Chuck,
>>
>>What are the exact rules. What would happen if you replace TheOLDword with OneOrMoreNewWords? Do you replace the middle part of a string where the left and right parts remain unchanged? Than STREXTRACT() combined with STRTRAN() would help. Of course you would need to figure out what to do when the replaced word has mixed case and the new one a different number of characters...
>>
>>For simple case, where the word is either all lower, proper or upper, you can pass 3 as the last parameter in STRTRAN().
>
>It's the same number of letters. It's for marketing we got a new domain name that just changed the last 3 letters of our old domain name and while we are keeping both working they want the entire website updated and sometimes they used mixed case and sometime the last three letters where upper and sometime just the first and sometimes none where upper. Now them being in marketing they want to preserve all the cases because it was done for a reason.

If the strings are short enough and you only want to match the word, then can you simply compare each word in a string by using GetWordCount and GetWordNum functions?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform