MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / size_t close_string_quote

Method size_t close_string_quote

include/CLI/impl/StringTools_inl.hpp:312–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312CLI11_INLINE std::size_t close_string_quote(const std::string &str, std::size_t start, char closure_char) {
313 std::size_t loc{0};
314 for(loc = start + 1; loc < str.size(); ++loc) {
315 if(str[loc] == closure_char) {
316 break;
317 }
318 if(str[loc] == '\\') {
319 // skip the next character for escaped sequences
320 ++loc;
321 }
322 }
323 return loc;
324}
325
326CLI11_INLINE std::size_t close_literal_quote(const std::string &str, std::size_t start, char closure_char) {
327 auto loc = str.find_first_of(closure_char, start + 1);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected