pub(crate) unsafe fn charsxp_to_str(charsxp: SEXP) -> &'static strExpand description
Convert CHARSXP to &str — zero-copy from R’s string data.
Uses R_CHAR + LENGTH (O(1), no strlen). UTF-8 validity is guaranteed
by miniextendr_assert_utf8_locale() at package init, so no per-string
validation is needed.
§Safety
charsxpmust be a valid CHARSXP (not NA_STRING, not null).- The returned
&stris only valid as long as R doesn’t GC the CHARSXP.