MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / raw_to_string

Function raw_to_string

rust/src/string.rs:28–34  ·  view source on GitHub ↗

TODO: Remove or refactor this.

(ptr: *const c_char)

Source from the content-addressed store, hash-verified

26
27// TODO: Remove or refactor this.
28pub(crate) fn raw_to_string(ptr: *const c_char) -> Option<String> {
29 if ptr.is_null() {
30 None
31 } else {
32 Some(unsafe { CStr::from_ptr(ptr).to_string_lossy().into_owned() })
33 }
34}
35
36// TODO: Make this pass in an iterator over something more generic...
37pub(crate) fn strings_to_string_list(strings: &[String]) -> *mut *mut c_char {

Callers 15

from_rawMethod · 0.85
from_rawMethod · 0.85
cb_get_option_textFunction · 0.85
cb_preprocess_sourceFunction · 0.85
cb_parse_type_stringFunction · 0.85
from_rawMethod · 0.85
assembleMethod · 0.85
cb_assembleFunction · 0.85
typesMethod · 0.85
from_rawMethod · 0.85
from_rawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected