General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only