View source: R/tcc_ptr_utils.R
| tcc_read_cstring | R Documentation |
Convert a C-style null-terminated string pointer back to R character string. Handles UTF-8 decoding automatically.
tcc_read_cstring(
ptr,
max_bytes = NULL,
null_action = c("na", "empty", "error")
)
ptr |
External pointer to C string |
max_bytes |
Optional maximum number of bytes to read (fixed-length read). |
null_action |
Behavior when ptr is NULL: one of "na", "empty", "error".
Only effective when |
Character string, or NA/"" for NULL pointers depending on
null_action.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.