MCPcopy Create free account
hub / github.com/csyonghe/Spire / StringConcat

Function StringConcat

Source/CoreLib/LibString.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7 {
8 _EndLine EndLine;
9 String StringConcat(const char * lhs, int leftLen, const char * rhs, int rightLen)
10 {
11 String res;
12 res.length = leftLen + rightLen;
13 res.buffer = new char[res.length + 1];
14 strcpy_s(res.buffer.Ptr(), res.length + 1, lhs);
15 strcpy_s(res.buffer + leftLen, res.length + 1 - leftLen, rhs);
16 return res;
17 }
18 String operator+(const char * op1, const String & op2)
19 {
20 if(!op2.buffer)

Callers 1

operator+Function · 0.85

Calls 2

strcpy_sFunction · 0.85
PtrMethod · 0.45

Tested by

no test coverage detected