MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / builtin_build_string

Function builtin_build_string

src/builtin/module_builtin_string.cpp:447–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445 }
446
447 char * builtin_build_string ( const TBlock<void,StringBuilderWriter> & block, Context * context, LineInfoArg * at ) {
448 StringBuilderWriter writer;
449 vec4f args[1];
450 args[0] = cast<StringBuilderWriter *>::from(&writer);
451 context->invoke(block, args, nullptr, at);
452 auto length = writer.tellp();
453 if ( length ) {
454 return context->allocateString(writer.c_str(), uint32_t(length),at);
455 } else {
456 return nullptr;
457 }
458 }
459
460 vec4f builtin_write_string ( Context &, SimNode_CallBase * call, vec4f * args ) {
461 StringBuilderWriter * writer = cast<StringBuilderWriter *>::to(args[0]);

Callers

nothing calls this directly

Calls 4

tellpMethod · 0.80
allocateStringMethod · 0.80
invokeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected