Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chrtran problem
Message
From
24/01/2008 12:23:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01285118
Message ID:
01285147
Views:
17
This message has been marked as a message which has helped to the initial question of the thread.
>Thank you
>I didn't now the difference between STRTRAN and CHRTRAN :)

StrTran() is the most similar to a "Find & Replace" command in Word. ChrTran() is a little more complicated, but it has its uses too. It may be used to quickly replace several individual characters at once. For example, the following ChrTran() will eliminate most diacriticals (accents, etc.) in Spanish:
chrtran(lcText, "áéíóúÁÉÍÓÚñÑüÜ", "aeiouAEIOUnNuU")
Each occurrence of "á" will be replaced with "a", each occurance of "é" with "e", etc.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform