tmpbuf_tr takes an input string and 2 sets of characters plus a default character. It produces a output string with all characters from the first set translated to the correspondending character in the 2nd set, similar to the shell 'tr' util.