MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / has_value_from_env

Method has_value_from_env

subprojects/llama.cpp/common/arg.cpp:136–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136bool common_arg::has_value_from_env() const {
137 if (env != nullptr && !args_neg.empty()) {
138 // for compatibility, we need to check LLAMA_ARG_NO_ env as well
139 std::string neg_env = env;
140 string_replace_all(neg_env, "LLAMA_ARG_", "LLAMA_ARG_NO_");
141 if (std::getenv(neg_env.c_str())) {
142 return true;
143 }
144 }
145 return env != nullptr && std::getenv(env);
146}
147
148static std::vector<std::string> break_str_into_lines(std::string input, size_t max_char_per_line) {
149 std::vector<std::string> result;

Callers 1

common_params_parse_exFunction · 0.80

Calls 2

string_replace_allFunction · 0.70
emptyMethod · 0.65

Tested by

no test coverage detected