MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / GetUtf8CommandLineArgs

Function GetUtf8CommandLineArgs

src/tools/PlatformIO.cpp:294–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292
293#ifdef _WIN32
294std::vector<std::string> GetUtf8CommandLineArgs() {
295 int argc = 0;
296 wchar_t** argv = CommandLineToArgvW(GetCommandLineW(), &argc);
297 std::vector<std::string> args;
298 if (argv == nullptr) {
299 return args;
300 }
301 args.reserve(static_cast<size_t>(argc));
302 for (int i = 0; i < argc; i++) {
303 args.push_back(internal::Utf8FromWide(argv[i]));
304 }
305 LocalFree(argv);
306 return args;
307}
308#endif
309
310} // namespace tools

Callers 2

wmainFunction · 0.85
mainFunction · 0.85

Calls 3

Utf8FromWideFunction · 0.85
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected