# Generates a CString instance fully escaped in C-style \xHH fashion
fun c_string_instance(ns: CString, len: Int): RuntimeVariable do
var mtype = mmodule.c_string_type
var nat = new_var(mtype)
var byte_esc = new Buffer.with_cap(len * 4)
for i in [0 .. len[ do
byte_esc.append("\\x{ns[i].to_hex}")
end
self.add("{nat} = \"{byte_esc}\";")
return nat
end
src/compiler/abstract_compiler.nit:1799,2--1809,4