diff options
Diffstat (limited to 'rust/src/string.rs')
| -rw-r--r-- | rust/src/string.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/src/string.rs b/rust/src/string.rs index 936e3033..bfb998d5 100644 --- a/rust/src/string.rs +++ b/rust/src/string.rs @@ -79,6 +79,10 @@ impl BnString { res } + pub(crate) fn as_raw(&self) -> &raw::c_char { + unsafe { &*self.raw } + } + pub fn as_str(&self) -> &str { unsafe { CStr::from_ptr(self.raw).to_str().unwrap() } } |
