MCPcopy Create free account
hub / github.com/WallBreaker2/op / GetEnvString

Function GetEnvString

tests/test_support.cpp:57–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57std::wstring GetEnvString(const wchar_t *name) {
58 wchar_t *value = nullptr;
59 size_t len = 0;
60 if (_wdupenv_s(&value, &len, name) != 0 || value == nullptr)
61 return L"";
62
63 std::wstring out(value);
64 free(value);
65 return TrimCopy(out);
66}
67
68std::wstring GetConfiguredOcrEndpoint() {
69 const std::wstring explicit_url = GetEnvString(L"OP_OCR_URL");

Callers 6

SetUpMethod · 0.85
TESTFunction · 0.85
GetConfiguredOcrEndpointFunction · 0.85
SetUpMethod · 0.85
TESTFunction · 0.85

Calls 1

TrimCopyFunction · 0.85

Tested by

no test coverage detected