pub struct Str;Implementations§
Source§impl Str
impl Str
pub fn slug(s: &str, separator: &str) -> String
pub fn studly(s: &str) -> String
pub fn camel(s: &str) -> String
pub fn snake(s: &str) -> String
pub fn kebab(s: &str) -> String
pub fn title(s: &str) -> String
pub fn headline(s: &str) -> String
pub fn contains(s: &str, needle: &str) -> bool
pub fn contains_all(s: &str, needles: &[&str]) -> bool
pub fn starts_with(s: &str, needle: &str) -> bool
pub fn ends_with(s: &str, needle: &str) -> bool
pub fn after<'a>(s: &'a str, search: &str) -> &'a str
pub fn before<'a>(s: &'a str, search: &str) -> &'a str
pub fn between<'a>(s: &'a str, from: &str, to: &str) -> &'a str
pub fn limit(s: &str, limit: usize, end: &str) -> String
pub fn substr(s: &str, start: usize, length: Option<usize>) -> String
pub fn position(s: &str, needle: &str, offset: usize) -> Option<usize>
pub fn length(s: &str) -> usize
pub fn is_ascii(s: &str) -> bool
pub fn word_count(s: &str) -> usize
pub fn is_json(s: &str) -> bool
pub fn pad_left(s: &str, length: usize, pad: &str) -> String
pub fn pad_right(s: &str, length: usize, pad: &str) -> String
pub fn pad_both(s: &str, length: usize, pad: &str) -> String
pub fn replace(s: &str, search: &str, replace: &str) -> String
pub fn replace_first(s: &str, search: &str, replace: &str) -> String
pub fn random(length: usize) -> String
pub fn random_numeric(length: usize) -> String
pub fn mask(s: &str, character: &str, start: usize, length: usize) -> String
pub fn ucfirst(s: &str) -> String
pub fn lcfirst(s: &str) -> String
pub fn repeat(s: &str, times: usize) -> String
pub fn trim(s: &str) -> String
pub fn trim_slashes(s: &str) -> String
pub fn finish(s: &str, cap: &str) -> String
pub fn start(s: &str, prefix: &str) -> String
pub fn is_url(s: &str) -> bool
pub fn of(s: &str) -> Stringable
pub fn is_uuid(s: &str) -> bool
Auto Trait Implementations§
impl Freeze for Str
impl RefUnwindSafe for Str
impl Send for Str
impl Sync for Str
impl Unpin for Str
impl UnsafeUnpin for Str
impl UnwindSafe for Str
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more