#[repr(C)]
pub struct WStr { /* fields omitted */ }
Expand description
Represents a borrowed Unicode string.
Returns the length of bytes.
Returns true
if the length of bytes is 0.
Converts WStr
to UTF-8 string.
The function replaces Illegal sequences with with \u{FFFD}
.
Converts WStr
to AString
.
use windy::{AString, WString};
let s = AString::from_str("test").unwrap();
let s2 = WString::from_str("test").unwrap().to_astring().unwrap();
assert_eq!(s, s2);
Converts WStr
to AString
.
use windy::{AString, WString};
let s = AString::from_str("test").unwrap();
let s2 = WString::from_str("test").unwrap().to_astring_lossy();
assert_eq!(s, s2);
Creates a new &WStr
from bytes
.
bytes
must be a correct Unicode string.
Creates a new &WStr
from bytes
.
bytes
must be a correct Unicode string.
Creates &WStr
from ptr
.
ptr
must be a null-terminated Unicode string.
Creates &WStr
from ptr
and len
.
ptr
must be a null-terminated unicode string.
Creates &WStr
from ptr
and len
without length check.
ptr
must be a null-terminated Unicode string.
The resulting type after applying the +
operator.
Formats the value using the given formatter. Read more
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more