pub struct StringInterner { /* private fields */ }Implementations§
Source§impl StringInterner
impl StringInterner
pub fn new() -> Self
pub fn with_capacity(capacity: usize, bytes: usize) -> Self
pub fn intern(&mut self, s: &str) -> StringHandle
pub fn get(&self, handle: StringHandle) -> &str
pub fn concat( &mut self, handle1: StringHandle, handle2: StringHandle, ) -> StringHandle
pub fn starts_with( &self, string_handle: StringHandle, starts_with_handle: StringHandle, ) -> bool
pub fn ends_with( &self, string_handle: StringHandle, suffix_handle: StringHandle, ) -> bool
pub fn contains( &self, string_handle: StringHandle, needle_handle: StringHandle, ) -> bool
pub fn to_uppercase(&mut self, handle: StringHandle) -> StringHandle
pub fn to_lowercase(&mut self, handle: StringHandle) -> StringHandle
pub fn length(&self, handle: StringHandle) -> usize
pub fn chars(&self, handle: StringHandle) -> impl Iterator<Item = char> + '_
pub fn char_at( &mut self, handle: StringHandle, index: usize, ) -> Option<StringHandle>
pub fn pad_start( &mut self, handle: StringHandle, width: usize, pad_char: char, ) -> StringHandle
pub fn pad_end( &mut self, handle: StringHandle, width: usize, pad_char: char, ) -> StringHandle
pub fn trim(&mut self, handle: StringHandle) -> StringHandle
pub fn trim_start(&mut self, handle: StringHandle) -> StringHandle
pub fn trim_end(&mut self, handle: StringHandle) -> StringHandle
pub fn get_allocated_bytes(&self) -> usize
Trait Implementations§
Source§impl Clone for StringInterner
impl Clone for StringInterner
Source§impl Debug for StringInterner
impl Debug for StringInterner
Auto Trait Implementations§
impl Freeze for StringInterner
impl RefUnwindSafe for StringInterner
impl Send for StringInterner
impl Sync for StringInterner
impl Unpin for StringInterner
impl UnsafeUnpin for StringInterner
impl UnwindSafe for StringInterner
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