Lines Matching full:buffer
6 proc escape_bash_quotes { buffer } { argument
8 # Do a bash-style escape of all single quotes in the buffer and return the result.
23 # buffer The string whose single quotes are to be escaped.
25 regsub -all {'} $buffer {'\''} new_buffer
31 proc quotes_to_curly_braces { buffer } { argument
40 # buffer The string whose quotes are to be converted to curly braces.
44 # set buffer {'Mike'\''s dog'}
45 # print_var buffer
46 # set buffer [quotes_to_curly_braces $buffer]
47 # print_var buffer
50 # buffer: 'Mike'\''s dog'
51 # buffer: {Mike's dog}
61 regsub -all {'\\''} $buffer ${place_holder} buffer
64 for {set ix 0} {$ix < [string length $buffer]} {incr ix} {
65 set char [string index $buffer $ix]
81 # For non-quote character, simply add it to the return buffer/
93 proc curly_braces_to_quotes { buffer } { argument
102 …# buffer The string whose curly braces are to be converted to single quot…
104 # For example, the following buffer value:
109 regsub -all {[\{\}]} [escape_bash_quotes $buffer] {'} new_buffer
115 proc escape_regex_metachars { buffer } { argument
117 # Escape every regex metacharacter found in buffer and return the result.
132 # buffer The string whose regex metacharacters are to be escaped.
135 regsub -all ${escape_chars_regex} ${buffer} {\\\0} buffer
136 return ${buffer}