MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / dequote

Method dequote

src/Lexer.cpp:219–225  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Assumes that quotes is a string containing a non-trivial set of quote characters.

Source from the content-addressed store, hash-verified

217// Assumes that quotes is a string containing a non-trivial set of quote
218// characters.
219void Lexer::dequote(std::string& input, const std::string& quotes) {
220 int quote = input[0];
221 if (quotes.find(quote) != std::string::npos) {
222 size_t len = input.length();
223 if (quote == input[len - 1]) input = input.substr(1, len - 2);
224 }
225}
226
227////////////////////////////////////////////////////////////////////////////////
228// Detects characters in an input string that indicate quotes were required, or

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected