MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / isQuoted

Function isQuoted

src/attributes.cpp:3099–3104  ·  view source on GitHub ↗

is the passed string quoted?

Source from the content-addressed store, hash-verified

3097
3098 // is the passed string quoted?
3099 bool isQuoted(const std::string& str) {
3100 if (str.length() < 2)
3101 return false; // #nocov
3102 char quote = *(str.begin());
3103 return (quote == '\'' || quote == '\"') && (*(str.rbegin()) == quote);
3104 }
3105
3106 // does a string end with another string?
3107 bool endsWith(const std::string& str, const std::string& suffix)

Callers 1

cppArgToRArgFunction · 0.85

Calls 2

lengthMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected