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

Method get_substring_before

src/StringUtils.cpp:80–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80std::string
81StringUtils::get_substring_before(const std::string &s, size_t &pos, const char close_delim)
82{
83 size_t end_pos = s.find_first_of(close_delim, pos);
84 if (end_pos == string::npos || end_pos == pos)
85 return "";
86 return s.substr(pos, (end_pos - pos));
87}
88
89char
90StringUtils::first_nonspace_char(const std::string &s)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected