{"id":24926834,"url":"https://github.com/jaytwolab/getenvvalue-cpp","last_synced_at":"2025-08-22T07:08:41.977Z","repository":{"id":254583449,"uuid":"846948324","full_name":"JayTwoLab/GetEnvValue-cpp","owner":"JayTwoLab","description":"Get OS environment value (using c++17)","archived":false,"fork":false,"pushed_at":"2024-08-29T04:36:08.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T12:53:24.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayTwoLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"yukrf5x","thanks_dev":null,"custom":null}},"created_at":"2024-08-24T12:13:38.000Z","updated_at":"2025-01-21T23:34:59.000Z","dependencies_parsed_at":"2024-08-24T15:05:42.224Z","dependency_job_id":null,"html_url":"https://github.com/JayTwoLab/GetEnvValue-cpp","commit_stats":null,"previous_names":["jaytwolab/getenvvalue-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FGetEnvValue-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FGetEnvValue-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FGetEnvValue-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FGetEnvValue-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayTwoLab","download_url":"https://codeload.github.com/JayTwoLab/GetEnvValue-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246028521,"owners_count":20712036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T12:53:27.820Z","updated_at":"2025-03-28T12:26:26.393Z","avatar_url":"https://github.com/JayTwoLab.png","language":"C++","readme":"# GetEnvValue-cpp\n\n- Get environment value of OS.\n    - It uses only Modern C++ (C++17).\n\n- How to install \n    - Just include ```GetEnvValue-cpp.h```\n\n- Case of obtaining ```PATH``` variable\n\n```cpp\n#include \"GetEnvValue-cpp.h\"\n\nint main() {\n\n    // get PATH\n    std::string envVarName = \"PATH\";\n    std::optional\u003cstd::string\u003e envVarValue = j2::getEnvVar(envVarName);\n    if (!envVarValue) {\n        std::cout \u003c\u003c envVarName \u003c\u003c \" is not set.\\n\";\n        return 0;\n    }\n\n#ifdef _WIN32\n    char delimiter = ';';\n#elif __APPLE__\n    char delimiter = ':';\n#elif __linux__\n    char delimiter = ':';\n#else\n    std::cout \u003c\u003c \"Unknown platform.\" \u003c\u003c std::endl;\n    return 0;\n#endif\n\n    std::string path = envVarValue.value();\n    std::vector\u003cstd::string\u003e directories = j2::splitPath(path, delimiter);\n    for (const auto \u0026dir : directories) {\n        std::cout \u003c\u003c dir \u003c\u003c std::endl;\n    }\n\n    return 0;\n}\n```\n\n## License\n\n- GetEnvValue-cpp is under MIT License.\n- It's a part of jaytwo(j2) library.\n- https://github.com/JayTwoLab/GetEnvValue-cpp\n\n\n","funding_links":["https://buymeacoffee.com/yukrf5x"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytwolab%2Fgetenvvalue-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaytwolab%2Fgetenvvalue-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytwolab%2Fgetenvvalue-cpp/lists"}