MCPcopy Create free account
hub / github.com/IENT/YUView / rangeFromString

Function rangeFromString

YUViewLib/src/statistics/ColorMapper.cpp:76–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76Range<int> rangeFromString(std::string rangeText)
77{
78 auto seperator = rangeText.find("|");
79 if (seperator == std::string::npos)
80 return {};
81
82 auto firstStr = rangeText.substr(0, seperator);
83 auto secondStr = rangeText.substr(seperator + 1);
84
85 try
86 {
87 auto first = std::stoi(firstStr);
88 auto second = std::stoi(secondStr);
89 return {first, second};
90 }
91 catch (const std::exception &)
92 {
93 return {};
94 }
95}
96
97} // namespace
98

Callers 1

loadPlaylistMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected