extendr_api::robj::into_robj

Function str_to_character

Source
pub(crate) fn str_to_character(s: &str) -> SEXP
Expand description

Returns an CHARSXP based on the provided &str.

Note that R does string interning, thus repeated application of this function on the same string, will incur little computational cost.

Note, that you must protect the return value somehow.