MCPcopy Create free account
hub / github.com/ZDoom/Raze / PrintStringConst

Function PrintStringConst

source/common/scripting/frontend/ast.cpp:280–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280static void PrintStringConst(FLispString &out, FString str)
281{
282 FString outstr;
283 outstr << '"';
284 for (size_t i = 0; i < str.Len(); ++i)
285 {
286 if (str[i] == '"')
287 {
288 outstr << "\"";
289 }
290 else if (str[i] == '\\')
291 {
292 outstr << "\\\\";
293 }
294 else if (str[i] >= 32)
295 {
296 outstr << str[i];
297 }
298 else
299 {
300 outstr.AppendFormat("\\x%02X", str[i]);
301 }
302 }
303 outstr << '"';
304 out.Add(outstr);
305}
306
307static void PrintClass(FLispString &out, const ZCC_TreeNode *node)
308{

Callers 1

PrintExprConstantFunction · 0.85

Calls 3

LenMethod · 0.80
AppendFormatMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected