Skip to main content

Rf_mkString

Function Rf_mkString 

Source
pub unsafe fn Rf_mkString(s: *const c_char) -> SEXP
Expand description

Create a length-1 string vector from a C string.

Rust equivalent of R’s inline Rf_mkString(s), which is shorthand for ScalarString(mkChar(s)).

§Safety

  • s must be a valid null-terminated C string
  • Must be called from R’s main thread
  • Result must be protected from GC