MCPcopy Create free account
hub / github.com/catboost/catboost / ParseEnvironNameValuePair

Function ParseEnvironNameValuePair

library/cpp/yt/system/env.cpp:31–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#endif
30
31std::pair<TStringBuf, std::optional<TStringBuf>> ParseEnvironNameValuePair(TStringBuf pair)
32{
33 if (auto pos = pair.find('='); pos != std::string::npos) {
34 return {pair.substr(0, pos), pair.substr(pos + 1)};
35 } else {
36 return {pair, std::nullopt};
37 }
38}
39
40////////////////////////////////////////////////////////////////////////////////
41

Callers 1

TESTFunction · 0.85

Calls 2

findMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected