pub trait StringStrategy: Clone + Default {
// Required methods
fn new() -> Self;
fn prepare(&self, s: &str) -> String;
fn len(&self, s: &str) -> usize;
fn remove(&self, s: &str, index: usize) -> String;
fn slice(&self, s: &str, start: usize, end: usize) -> String;
fn suffix(&self, s: &str, start: usize) -> String;
fn at(&self, s: &str, i: isize) -> Option<char>;
}Required Methods§
fn new() -> Self
fn prepare(&self, s: &str) -> String
fn len(&self, s: &str) -> usize
fn remove(&self, s: &str, index: usize) -> String
fn slice(&self, s: &str, start: usize, end: usize) -> String
fn suffix(&self, s: &str, start: usize) -> String
fn at(&self, s: &str, i: isize) -> Option<char>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl StringStrategy for AsciiStringStrategy
Available on non-WebAssembly only.