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

Method get_string_with_opts

rust/src/settings.rs:191–214  ·  view source on GitHub ↗
(
        &self,
        key: S,
        options: &mut QueryOptions,
    )

Source from the content-addressed store, hash-verified

189 }
190
191 pub fn get_string_with_opts<S: BnStrCompatible>(
192 &self,
193 key: S,
194 options: &mut QueryOptions,
195 ) -> BnString {
196 let key = key.into_bytes_with_nul();
197 let view_ptr = match options.view.as_ref() {
198 Some(view) => view.handle,
199 _ => std::ptr::null_mut(),
200 };
201 let func_ptr = match options.function.as_ref() {
202 Some(func) => func.handle,
203 _ => std::ptr::null_mut(),
204 };
205 unsafe {
206 BnString::from_raw(BNSettingsGetString(
207 self.handle,
208 key.as_ref().as_ptr() as *mut _,
209 view_ptr,
210 func_ptr,
211 &mut options.scope,
212 ))
213 }
214 }
215
216 pub fn get_string_list<S: BnStrCompatible>(&self, key: S) -> Array<BnString> {
217 self.get_string_list_with_opts(key, &mut QueryOptions::default())

Callers 4

get_stringMethod · 0.80
active_local_cacheFunction · 0.80
load_from_fileMethod · 0.80
from_view_settingsMethod · 0.80

Calls 2

into_bytes_with_nulMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected