MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / parse_time_string

Function parse_time_string

dds/DCPS/security/AccessControl/XmlUtils.cpp:173–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171# define XMLDATETIME_HAS_GETEPOCH 0
172namespace {
173 bool parse_time_string(
174 const std::string& whole, size_t& pos, std::string& value, size_t width = std::string::npos)
175 {
176 const bool to_end = width == std::string::npos;
177 const size_t size = whole.size();
178 if (pos >= size || (!to_end && pos + width > size)) {
179 return false;
180 }
181 value = whole.substr(pos, width);
182 pos = to_end ? size : pos + width;
183 return true;
184 }
185
186 bool parse_time_field(
187 const std::string& whole, size_t& pos, int& value, size_t width = 2)

Callers 3

parse_time_fieldFunction · 0.85
parse_time_char_or_endFunction · 0.85
parse_timeFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected