[−][src]Struct imgui::ImStr
A UTF-8 encoded, implicitly null-terminated string slice.
Implementations
impl ImStr
[src]
pub unsafe fn from_ptr_unchecked<'a>(ptr: *const c_char) -> &'a ImStr
[src]
Wraps a raw UTF-8 encoded C string
Safety
It is up to the caller to guarantee the pointer is not null and it points to a null-terminated UTF-8 string valid for the duration of the arbitrary lifetime 'a.
pub unsafe fn from_utf8_with_nul_unchecked(bytes: &[u8]) -> &ImStr
[src]
Converts a slice of bytes to an imgui-rs string slice without checking for valid UTF-8 or null termination.
Safety
It is up to the caller to guarantee the slice contains valid UTF-8 and a null terminator.
pub unsafe fn from_cstr_unchecked(value: &CStr) -> &ImStr
[src]
Converts a CStr reference to an imgui-rs string slice without checking for valid UTF-8.
Safety
It is up to the caller to guarantee the CStr reference contains valid UTF-8.
pub fn as_ptr(&self) -> *const c_char
[src]
Converts an imgui-rs string slice to a raw pointer
pub fn to_str(&self) -> &str
[src]
Converts an imgui-rs string slice to a normal string slice
pub fn is_empty(&self) -> bool
[src]
Returns true if the imgui-rs string slice is empty
Trait Implementations
impl AsRef<CStr> for ImStr
[src]
impl AsRef<ImStr> for ImString
[src]
impl AsRef<ImStr> for ImStr
[src]
impl AsRef<str> for ImStr
[src]
impl Borrow<ImStr> for ImString
[src]
impl Debug for ImStr
[src]
impl<'a> Default for &'a ImStr
[src]
impl Display for ImStr
[src]
impl Eq for ImStr
[src]
impl<'a> From<&'a ImStr> for Cow<'a, ImStr>
[src]
impl Hash for ImStr
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,