Skip to main content

StrExt

Trait StrExt 

Source
pub trait StrExt {
    // Required method
    fn strip_end_counted(&self, count: usize) -> &str;
}
Expand description

Extension trait adding a method to str

Required Methods§

Source

fn strip_end_counted(&self, count: usize) -> &str

Remove count bytes from the end of self

§Panics

Panics if count > self.len().

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StrExt for str

Extension trait adding a method to str

Source§

fn strip_end_counted(&self, count: usize) -> &str

Remove count bytes from the end of self

§Panics

Panics if count > self.len().

Implementors§