MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / AllocString

Method AllocString

Source/Engine/Scripting/ManagedCLR/MCore.cpp:77–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77StringAnsiView MAssembly::AllocString(const char* str)
78{
79 if (!str)
80 return StringAnsiView::Empty;
81 int32 len = StringUtils::Length(str);
82 char* mem = (char*)Memory.Allocate(len + 1);
83 Platform::MemoryCopy(mem, str, len);
84 mem[len] = 0;
85 return StringAnsiView(mem, len);
86}
87
88String MAssembly::ToString() const
89{

Callers 5

MClassMethod · 0.80
DotNet.cppFile · 0.80
MEventMethod · 0.80
MFieldMethod · 0.80
MPropertyMethod · 0.80

Calls 3

LengthFunction · 0.50
StringAnsiViewClass · 0.50
AllocateMethod · 0.45

Tested by

no test coverage detected