R_CHAR.Rd
Convert a string scalar (CHARSXP
) to a C-string (char
*
).
x |
---|
C string, i.e., a pointer char *
.
const char *(R_CHAR)(SEXP x);
In Rinternals.h.
const char *(R_CHAR)(SEXP x) { if(TYPEOF(x) != CHARSXP) // Han-Tak proposes to prepend 'x && ' error("%s() can only be applied to a '%s', not a '%s'", "CHAR", "CHARSXP", type2char(TYPEOF(x))); return (const char *) CHAR(CHK(x)); }
In memory.c.