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

Function StrCmp

inst/include/Rcpp/internal/NAComparator.h:30–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace internal {
29
30inline int StrCmp(SEXP x, SEXP y) {
31 if (x == NA_STRING) return (y == NA_STRING ? 0 : 1);
32 if (y == NA_STRING) return -1;
33 if (x == y) return 0; // same string in cache
34 return strcmp(char_nocheck(x), char_nocheck(y));
35}
36
37template <typename T>
38struct NAComparator {

Callers 1

operator()Method · 0.85

Calls 1

char_nocheckFunction · 0.50

Tested by

no test coverage detected