#[repr(C)]
pub struct AString { /* fields omitted */ }
Expand description
Returns the length of bytes.
Returns true
if the length of bytes is 0.
Creates AString
from v
without any encoding checks.
v
must be a correct ANSI string.
Creates AString
from v
without a null-terminated check and any encoding checks.
v
must be a null-terminated ANSI string.
Converts &str
to AString
.
use windy::AString;
let s = AString::from_str("test").unwrap();
println!("{:?}", s);
Converts &str
to AString
.
use windy::AString;
let s = AString::from_str_lossy("test🍣");
println!("{:?}", s);
Creates AString
from ptr
.
ptr
must be a null-terminated ANSI string.
Creates AString
from ptr
and len
.
ptr
must be a null-terminated ANSI string.
Creates AString
from ptr
and len
without length check.
ptr
must be a null-terminated ANSI string.
Returns the length of bytes.
Returns true
if the length of bytes is 0.
Converts AStr
to WString
.
Returns ConvertError::ConvertToUnicodeError
if an input cannot be converted to a wide char.
use windy::{AString, WString};
let s = WString::from_str("test").unwrap();
let s2 = AString::from_str("test").unwrap().to_wstring().unwrap();
assert_eq!(s, s2);
Converts AStr
to WString
.
use windy::{AString, WString};
let s = WString::from_str("test").unwrap();
let s2 = AString::from_str("test").unwrap().to_wstring_lossy();
assert_eq!(s, s2);
The resulting type after applying the +
operator.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. 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
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
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
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.