MCPcopy Create free account
hub / github.com/csmith-project/csmith / get_substring

Method get_substring

src/StringUtils.cpp:65–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65std::string
66StringUtils::get_substring(const std::string &s, const char open_delim, const char close_delim)
67{
68 if (s.empty())
69 return "";
70 size_t pos = 0;
71 ignore_spaces(s, pos);
72
73 if (s[pos] != open_delim)
74 return "";
75
76 pos++;
77 return get_substring_before(s, pos, close_delim);
78}
79
80std::string
81StringUtils::get_substring_before(const std::string &s, size_t &pos, const char close_delim)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected