MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / StringToMultiString

Function StringToMultiString

SpeedTest/Win32ApiTest.cpp:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <iostream>
5
6static auto StringToMultiString(std::wstring_view src)
7{
8 auto buffer = std::make_unique<wchar_t[]>(src.size() + 2);
9 std::copy(src.begin(), src.end(), buffer.get());
10 buffer[src.size()] = L'\0';
11 buffer[src.size() + 1] = L'\0';
12 return buffer;
13}
14
15bool Win32ApiTest::Run(std::vector<TestOperation> const& paths)
16{

Callers 1

RunMethod · 0.85

Calls 4

sizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected