Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing Fields
Message
From
06/01/1999 11:51:22
Donald Krasnick
Stanton Systems and Consulting
Havertown, Pennsylvania, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00173008
Message ID:
00173171
Views:
20
If you're doing a lot of text processing, take a look at the SYS(15) function. This can be used to quickly do a mass conversion of characters.

The SYS(15) function "translates" the 2nd argument using the 1st argument as a "mask". That is, for each character in the 2nd arg, we use its numeric value as the index into the 1st arg.

For example, the following expression will convert all lower-case characters to upper-cae and all numbers or punctuation into spaces.

lcTran = SPACE(64) + ;
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" + SPACE(6) + ;
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" + SPACE(6)

?SYS(15, lcTran, "abc123DEF$%^") && prints "ABC DEF "

Don
Previous
Reply
Map
View

Click here to load this message in the networking platform