Trait Alphanumeric

Source
pub trait Alphanumeric: ArrayElement {
Show 27 methods // Required methods fn from_str(str: &str) -> Self; fn _append(&self, other: Self) -> Self; fn _multiply(&self, n: usize) -> Self; fn _capitalize(&self) -> Self; fn _lower(&self) -> Self; fn _upper(&self) -> Self; fn _swapcase(&self) -> Self; fn _center(&self, width: usize, fill_char: char) -> Self; fn _join(&self, sep: Self) -> Self; fn _partition(&self, sep: Self) -> Tuple3<Self, Self, Self>; fn _rpartition(&self, sep: Self) -> Tuple3<Self, Self, Self>; fn _split(&self, sep: Self, max_split: Option<usize>) -> List<Self>; fn _rsplit(&self, sep: Self, max_split: Option<usize>) -> List<Self>; fn _splitlines(&self, keep_ends: bool) -> List<Self>; fn _replace(&self, old: Self, new: Self, count: Option<usize>) -> Self; fn _strip(&self, chars: Self) -> Self; fn _ljust(&self, width: usize, fill_char: char) -> Self; fn _lstrip(&self, chars: Self) -> Self; fn _rjust(&self, width: usize, fill_char: char) -> Self; fn _rstrip(&self, chars: Self) -> Self; fn _equal(&self, other: Self) -> bool; fn _not_equal(&self, other: Self) -> bool; fn _greater_equal(&self, other: Self) -> bool; fn _less_equal(&self, other: Self) -> bool; fn _greater(&self, other: Self) -> bool; fn _less(&self, other: Self) -> bool; fn _count(&self, sub: &str) -> usize;
}
Expand description

Alphanumeric trait for array

Required Methods§

Source

fn from_str(str: &str) -> Self

parse from &str

Source

fn _append(&self, other: Self) -> Self

append string with another

Source

fn _multiply(&self, n: usize) -> Self

multiply string n-times

Source

fn _capitalize(&self) -> Self

capitalize string

Source

fn _lower(&self) -> Self

lower case string

Source

fn _upper(&self) -> Self

upper case string

Source

fn _swapcase(&self) -> Self

swap case in string

Source

fn _center(&self, width: usize, fill_char: char) -> Self

center string elements

Source

fn _join(&self, sep: Self) -> Self

join string by separator

Source

fn _partition(&self, sep: Self) -> Tuple3<Self, Self, Self>

partition string by first occurrence of separator

Source

fn _rpartition(&self, sep: Self) -> Tuple3<Self, Self, Self>

partition string by last occurrence of separator

Source

fn _split(&self, sep: Self, max_split: Option<usize>) -> List<Self>

split string by separator

Source

fn _rsplit(&self, sep: Self, max_split: Option<usize>) -> List<Self>

split string by separator from right

Source

fn _splitlines(&self, keep_ends: bool) -> List<Self>

split string by line break character

Source

fn _replace(&self, old: Self, new: Self, count: Option<usize>) -> Self

replace string with times

Source

fn _strip(&self, chars: Self) -> Self

strips string elements

Source

fn _ljust(&self, width: usize, fill_char: char) -> Self

left-justifies string elements

Source

fn _lstrip(&self, chars: Self) -> Self

left-strips string elements

Source

fn _rjust(&self, width: usize, fill_char: char) -> Self

right-justifies string elements

Source

fn _rstrip(&self, chars: Self) -> Self

right-strips string elements

Source

fn _equal(&self, other: Self) -> bool

is equal to

Source

fn _not_equal(&self, other: Self) -> bool

is not equal to

Source

fn _greater_equal(&self, other: Self) -> bool

is greater or equal to

Source

fn _less_equal(&self, other: Self) -> bool

is less or equal to

Source

fn _greater(&self, other: Self) -> bool

is greater than

Source

fn _less(&self, other: Self) -> bool

is less than

Source

fn _count(&self, sub: &str) -> usize

counts non-overlapping occurrences of substring

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.

Implementations on Foreign Types§

Source§

impl Alphanumeric for char

Source§

fn from_str(str: &str) -> Self

Source§

fn _append(&self, _: Self) -> Self

Source§

fn _multiply(&self, _: usize) -> Self

Source§

fn _capitalize(&self) -> Self

Source§

fn _lower(&self) -> Self

Source§

fn _upper(&self) -> Self

Source§

fn _swapcase(&self) -> Self

Source§

fn _center(&self, _: usize, _: char) -> Self

Source§

fn _join(&self, _: Self) -> Self

Source§

fn _partition(&self, sep: Self) -> Tuple3<Self, Self, Self>

Source§

fn _rpartition(&self, sep: Self) -> Tuple3<Self, Self, Self>

Source§

fn _split(&self, sep: Self, _: Option<usize>) -> List<Self>

Source§

fn _rsplit(&self, sep: Self, _: Option<usize>) -> List<Self>

Source§

fn _splitlines(&self, _: bool) -> List<Self>

Source§

fn _replace(&self, old: Self, new: Self, _: Option<usize>) -> Self

Source§

fn _strip(&self, chars: Self) -> Self

Source§

fn _ljust(&self, _: usize, _: char) -> Self

Source§

fn _lstrip(&self, chars: Self) -> Self

Source§

fn _rjust(&self, _: usize, _: char) -> Self

Source§

fn _rstrip(&self, chars: Self) -> Self

Source§

fn _equal(&self, other: Self) -> bool

Source§

fn _not_equal(&self, other: Self) -> bool

Source§

fn _greater_equal(&self, other: Self) -> bool

Source§

fn _less_equal(&self, other: Self) -> bool

Source§

fn _greater(&self, other: Self) -> bool

Source§

fn _less(&self, other: Self) -> bool

Source§

fn _count(&self, sub: &str) -> usize

Source§

impl Alphanumeric for String

Source§

fn from_str(str: &str) -> Self

Source§

fn _append(&self, other: Self) -> Self

Source§

fn _multiply(&self, n: usize) -> Self

Source§

fn _capitalize(&self) -> Self

Source§

fn _lower(&self) -> Self

Source§

fn _upper(&self) -> Self

Source§

fn _swapcase(&self) -> Self

Source§

fn _center(&self, width: usize, fill_char: char) -> Self

Source§

fn _join(&self, sep: Self) -> Self

Source§

fn _partition(&self, sep: Self) -> Tuple3<Self, Self, Self>

Source§

fn _rpartition(&self, sep: Self) -> Tuple3<Self, Self, Self>

Source§

fn _split(&self, sep: Self, max_split: Option<usize>) -> List<Self>

Source§

fn _rsplit(&self, sep: Self, max_split: Option<usize>) -> List<Self>

Source§

fn _splitlines(&self, keep_ends: bool) -> List<Self>

Source§

fn _replace(&self, old: Self, new: Self, count: Option<usize>) -> Self

Source§

fn _strip(&self, chars: Self) -> Self

Source§

fn _ljust(&self, width: usize, fill_char: char) -> Self

Source§

fn _lstrip(&self, chars: Self) -> Self

Source§

fn _rjust(&self, width: usize, fill_char: char) -> Self

Source§

fn _rstrip(&self, chars: Self) -> Self

Source§

fn _equal(&self, other: Self) -> bool

Source§

fn _not_equal(&self, other: Self) -> bool

Source§

fn _greater_equal(&self, other: Self) -> bool

Source§

fn _less_equal(&self, other: Self) -> bool

Source§

fn _greater(&self, other: Self) -> bool

Source§

fn _less(&self, other: Self) -> bool

Source§

fn _count(&self, sub: &str) -> usize

Implementors§