List/Set.tr(dataIn,dataOut)

Tinderbox Icon


Operator Type:   Function
Operator Scope of Action:   Item
Operator Purpose:   Data manipulation

List.tr(dataIn,dataOut)

New to v5.7.0 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.


Possible relevant notes (via "Similar Notes" feature):

Up: Item-based operators

A Tinderbox Reference File : Actions & Rules : Operators : Action Operator Scope : Item-based operators : List/Set.tr(dataIn,dataOut)

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox