Struct enhanced_magic_string::utils::char_string::CharString
source · pub struct CharString { /* private fields */ }Implementations§
source§impl CharString
impl CharString
pub fn new(str: &str) -> Self
pub fn get(&self, index: usize) -> Option<&char>
pub fn get_mut(&mut self, index: usize) -> Option<&mut char>
pub fn slice(&self, start: usize, end: usize) -> Self
pub fn split(&self, separator: char) -> Vec<Self>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn insert(&mut self, index: usize, char: char)
pub fn remove(&mut self, index: usize) -> Option<char>
pub fn append_str(&mut self, other: &str)
pub fn append(&mut self, other: &CharString)
Trait Implementations§
source§impl Clone for CharString
impl Clone for CharString
source§fn clone(&self) -> CharString
fn clone(&self) -> CharString
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CharString
impl Debug for CharString
source§impl Display for CharString
impl Display for CharString
source§impl From<&String> for CharString
impl From<&String> for CharString
source§impl From<&str> for CharString
impl From<&str> for CharString
source§impl From<String> for CharString
impl From<String> for CharString
source§impl From<char> for CharString
impl From<char> for CharString
source§impl PartialEq for CharString
impl PartialEq for CharString
source§fn eq(&self, other: &CharString) -> bool
fn eq(&self, other: &CharString) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for CharString
impl StructuralPartialEq for CharString
Auto Trait Implementations§
impl Freeze for CharString
impl RefUnwindSafe for CharString
impl Send for CharString
impl Sync for CharString
impl Unpin for CharString
impl UnwindSafe for CharString
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.