(pointer: *const c_char)
| 27 | use crate::{cache, errors, InvocationArg, JavaClass}; |
| 28 | |
| 29 | pub(crate) unsafe fn to_rust_string(pointer: *const c_char) -> errors::Result<String> { |
| 30 | let slice = CStr::from_ptr(pointer).to_bytes(); |
| 31 | Ok(from_java_cesu8(slice)?.to_string()) |
| 32 | } |
| 33 | |
| 34 | pub(crate) fn to_c_string(string: &str) -> *mut c_char { |
| 35 | let cs = CString::new(string.as_bytes()).unwrap(); |
no test coverage detected