[−][src]Struct orbtk_api::macros::String16
A UTF-16 encoded, growable string.
Examples
let mut string16 = String16::from("Übung"); string16.push('ä');
Implementations
impl String16
[src]
pub fn new() -> String16
[src]
Creates a new empty String16
.
pub fn len(&self) -> usize
[src]
Returns the length of this String16
, in bytes.
Examples
Basic usage:
let a = String16::from("Übung");
assert_eq!(a.len(), 5);
pub fn as_bytes(&self) -> &[u16]
[src]
Returns a slice of u16
s bytes that were attempted to convert to a String
.
pub fn as_bytes_mut(&mut self) -> &mut [u16]
[src]
Returns a mutable slice of u16
s bytes that were attempted to convert to a String
.
pub fn insert_str(&mut self, idx: usize, string: &str)
[src]
Inserts a string slice into this String16
at a byte position.
pub fn push(&mut self, ch: char)
[src]
Appends a given char onto the end of this String16
.
pub fn remove(&mut self, idx: usize)
[src]
Removes a char
from this String16
at a byte position and returns it.
pub fn is_empty(&self) -> bool
[src]
Returns true
if this String16
has a length of zero, and false
otherwise.
pub fn ends_with(&self, pat: &str) -> bool
[src]
Returns true
if this String16
ends with the given string slice, or false
otherwise.
pub fn clear(&mut self)
[src]
Truncates this String16
, removing all contents.
pub fn get_string(&self, start: usize, end: usize) -> Option<String>
[src]
Returns a string part begins with the start
and ends with the end
index.
pub fn as_string(&self) -> String
[src]
Converts the String16
value to a String.
Trait Implementations
impl Clone for String16
[src]
impl Debug for String16
[src]
impl Default for String16
[src]
impl<'de> Deserialize<'de> for String16
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<String16, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<String16, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Display for String16
[src]
impl<'_> From<&'_ str> for String16
[src]
impl From<String> for String16
[src]
impl IntoPropertySource<String16> for String16
[src]
fn into_source(self) -> PropertySource<String16>
[src]
impl IntoPropertySource<String16> for Entity
[src]
fn into_source(self) -> PropertySource<String16>
[src]
impl IntoPropertySource<String16> for (String, Entity)
[src]
fn into_source(self) -> PropertySource<String16>
[src]
impl<'_> IntoPropertySource<String16> for (&'_ str, Entity)
[src]
fn into_source(self) -> PropertySource<String16>
[src]
impl<'_> IntoPropertySource<String16> for &'_ str
[src]
fn into_source(self) -> PropertySource<String16>
[src]
impl IntoPropertySource<String16> for String
[src]
fn into_source(self) -> PropertySource<String16>
[src]
impl PartialEq<String16> for String16
[src]
impl Serialize for String16
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Auto Trait Implementations
impl RefUnwindSafe for String16
impl Send for String16
impl Sync for String16
impl Unpin for String16
impl UnwindSafe for String16
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,