Lines Matching refs:ch
26 foreach ch $args { lappend res [Unquote $ch] }
30 proc ::char::Unquote {ch} {
35 switch -exact -- $ch {
46 if {[regexp {^\\([0-2][0-7][0-7])$} $ch -> ocode]} {
49 } elseif {[regexp {^\\([0-7][0-7]?)$} $ch -> ocode]} {
52 } elseif {[regexp {^\\u([[:xdigit:]][[:xdigit:]]?[[:xdigit:]]?[[:xdigit:]]?)$} $ch -> hcode]} {
57 return $ch
63 foreach ch $args { lappend res [Tcl $ch] }
67 proc ::char::quote::Tcl {ch} {
74 switch -exact -- $ch {
86 scan $ch %c chcode
91 scan $ch %c chcode
94 if {[::string is control -strict $ch]} {
106 return $ch
112 foreach ch $args { lappend res [String $ch] }
116 proc ::char::quote::String {ch} {
128 switch -exact -- $ch {
137 return \\$ch
141 scan $ch %c chcode
144 if {[::string is control -strict $ch]} {
156 return $ch
162 foreach ch $args { lappend res [CString $ch] }
166 proc ::char::quote::CString {ch} {
178 switch -exact -- $ch {
183 return \\$ch
187 scan $ch %c chcode
190 if {[::string is control -strict $ch]} {
202 return $ch
208 foreach ch $args { lappend res [Comment $ch] }
212 proc ::char::quote::Comment {ch} {
219 switch -exact -- $ch {
227 return \\$ch
231 scan $ch %c chcode
234 if {[::string is control -strict $ch]} {
246 return $ch