| 3117 | } // #nocov end |
| 3118 | |
| 3119 | bool isRoxygenCpp(const std::string& str) { |
| 3120 | size_t len = str.length(); |
| 3121 | if (len < 3) return false; |
| 3122 | size_t idx = str.find_first_not_of(kWhitespaceChars); |
| 3123 | if (idx == std::string::npos) return false; |
| 3124 | |
| 3125 | // make sure there are characters to check |
| 3126 | if (len - 2 < idx) return false; |
| 3127 | |
| 3128 | if (str[idx] == '/' && |
| 3129 | str[idx + 1] == '/' && |
| 3130 | str[idx + 2] == '\'') { |
| 3131 | return true; |
| 3132 | } |
| 3133 | |
| 3134 | return false; |
| 3135 | |
| 3136 | } |
| 3137 | |
| 3138 | } // namespace attributes |
| 3139 | } // namespace Rcpp |
no test coverage detected