MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / to_c_string

Function to_c_string

rust/src/utils.rs:34–37  ·  view source on GitHub ↗
(string: &str)

Source from the content-addressed store, hash-verified

32}
33
34pub(crate) fn to_c_string(string: &str) -> *mut c_char {
35 let cs = CString::new(string.as_bytes()).unwrap();
36 cs.into_raw()
37}
38
39pub(crate) fn to_c_string_struct(string: &str) -> CString {
40 let enc = to_java_cesu8(string).into_owned();

Callers 4

create_jvmMethod · 0.85
find_classFunction · 0.85
find_class_defaultFunction · 0.85
find_classFunction · 0.85

Calls 1

into_rawMethod · 0.80

Tested by

no test coverage detected