| 55 | } |
| 56 | |
| 57 | std::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 | |
| 68 | std::wstring GetConfiguredOcrEndpoint() { |
| 69 | const std::wstring explicit_url = GetEnvString(L"OP_OCR_URL"); |
no test coverage detected