Posted to tcl by kostix at Sun Oct 10 23:02:28 GMT 2010view raw
- % proc fixup s {
- variable map
- if {![info exists map]} {
- for {set i 0} {$i <= 0xFF} {incr i} {
- lappend map &#[format %.02x $i]\; [format %c $i]
- }
- }
- return [string map $map $s]
- }
- % fixup "aaa'bbb"
- aaa9bbb