blob: 81f8deb4035e0ecd4657eee88d288220ae457bae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use crate::{
string::{BnString, IntoCStr},
types::QualifiedName,
};
use binaryninjacore_sys::{BNRustSimplifyStrToFQN, BNRustSimplifyStrToStr};
pub fn simplify_str_to_str<S: IntoCStr>(input: S) -> BnString {
let name = input.to_cstr();
unsafe { BnString::from_raw(BNRustSimplifyStrToStr(name.as_ptr())) }
}
pub fn simplify_str_to_fqn<S: IntoCStr>(input: S, simplify: bool) -> QualifiedName {
let name = input.to_cstr();
unsafe { QualifiedName::from_owned_raw(BNRustSimplifyStrToFQN(name.as_ptr(), simplify)) }
}
|