This version is out of date, covering development from v6.0.0 to v6.6.5. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

TinderboxSix Icon

List/Set.tr(dataIn,dataOut)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 Baseline

 


List.tr(dataIn,dataOut)

This operator allows simple single character string manipulation. It computes a new list, copying each character of the source list but converting any characters in dataIn to the corresponding characters in dataOut. For example:

$MyList.tr("a","A") 

returns a copy of $MyList in which every "a" is converted to "A".

Backslash characters must be quoted and escaped:

$MyList("c","\\r") 

converts every "c" to a Macintosh newline characters (\r) - note the need in this context for an extra backslash escape (so Tinderbox knows the intended swap value is "\r" and not "r").

For further information, see the Mac OS X man page for the UNIX tr command.



A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : List/Set.tr(dataIn,dataOut)