Trait StringExt

Source
pub trait StringExt {
Show 15 methods // Required methods fn is_empty_or_whitespaces(&self) -> bool; fn split_get_first(&self, splitter: Option<String>) -> String; fn split_get_last(&self, splitter: Option<String>) -> String; fn get_first_char(&self) -> Option<char>; fn trim_char(&self, trimmer: Option<String>) -> String; fn trim_start_char(&self, trimmer: Option<String>) -> String; fn trim_end_char(&self, trimmer: Option<String>) -> String; fn uppercase_first_letter(&self) -> String; fn lowercase_first_letter(&self) -> String; fn pascal_case(&self) -> String; fn camel_case(&self) -> String; fn snake_case(&self) -> String; fn on_one_line( &self, indent: Option<u64>, line_break: Option<bool>, replacer: Option<&str>, ) -> String; fn regex_extract( &self, regex_extractor: &str, regex_replacer: Option<&str>, separator: Option<&str>, ) -> Result<String, HelpersError>; fn regex_transform( &self, regex_pattern: &str, regex_replacer: &str, ) -> Result<String, HelpersError>;
}

Required Methods§

Source

fn is_empty_or_whitespaces(&self) -> bool

Source

fn split_get_first(&self, splitter: Option<String>) -> String

Source

fn split_get_last(&self, splitter: Option<String>) -> String

Source

fn get_first_char(&self) -> Option<char>

Source

fn trim_char(&self, trimmer: Option<String>) -> String

Source

fn trim_start_char(&self, trimmer: Option<String>) -> String

Source

fn trim_end_char(&self, trimmer: Option<String>) -> String

Source

fn uppercase_first_letter(&self) -> String

Source

fn lowercase_first_letter(&self) -> String

Source

fn pascal_case(&self) -> String

Source

fn camel_case(&self) -> String

Source

fn snake_case(&self) -> String

Source

fn on_one_line( &self, indent: Option<u64>, line_break: Option<bool>, replacer: Option<&str>, ) -> String

Source

fn regex_extract( &self, regex_extractor: &str, regex_replacer: Option<&str>, separator: Option<&str>, ) -> Result<String, HelpersError>

Source

fn regex_transform( &self, regex_pattern: &str, regex_replacer: &str, ) -> Result<String, HelpersError>

Implementations on Foreign Types§

Source§

impl StringExt for &str

Source§

fn is_empty_or_whitespaces(&self) -> bool

Source§

fn split_get_first(&self, splitter: Option<String>) -> String

Source§

fn split_get_last(&self, splitter: Option<String>) -> String

Source§

fn get_first_char(&self) -> Option<char>

Source§

fn trim_char(&self, trimmer: Option<String>) -> String

Source§

fn trim_start_char(&self, trimmer: Option<String>) -> String

Source§

fn trim_end_char(&self, trimmer: Option<String>) -> String

Source§

fn uppercase_first_letter(&self) -> String

Source§

fn lowercase_first_letter(&self) -> String

Source§

fn pascal_case(&self) -> String

Source§

fn camel_case(&self) -> String

Source§

fn snake_case(&self) -> String

Source§

fn on_one_line( &self, indent: Option<u64>, line_break: Option<bool>, replacer: Option<&str>, ) -> String

Source§

fn regex_extract( &self, regex_extractor: &str, replacer: Option<&str>, separator: Option<&str>, ) -> Result<String, HelpersError>

Source§

fn regex_transform( &self, regex_pattern: &str, regex_replacer: &str, ) -> Result<String, HelpersError>

Source§

impl StringExt for Option<String>

Source§

fn is_empty_or_whitespaces(&self) -> bool

Source§

fn split_get_first(&self, splitter: Option<String>) -> String

Source§

fn split_get_last(&self, splitter: Option<String>) -> String

Source§

fn get_first_char(&self) -> Option<char>

Source§

fn trim_char(&self, trimmer: Option<String>) -> String

Source§

fn trim_start_char(&self, trimmer: Option<String>) -> String

Source§

fn trim_end_char(&self, trimmer: Option<String>) -> String

Source§

fn uppercase_first_letter(&self) -> String

Source§

fn lowercase_first_letter(&self) -> String

Source§

fn pascal_case(&self) -> String

Source§

fn camel_case(&self) -> String

Source§

fn snake_case(&self) -> String

Source§

fn on_one_line( &self, indent: Option<u64>, line_break: Option<bool>, replacer: Option<&str>, ) -> String

Source§

fn regex_extract( &self, regex_extractor: &str, regex_replacer: Option<&str>, separator: Option<&str>, ) -> Result<String, HelpersError>

Source§

fn regex_transform( &self, regex_pattern: &str, regex_replacer: &str, ) -> Result<String, HelpersError>

Source§

impl StringExt for String

Source§

fn is_empty_or_whitespaces(&self) -> bool

Source§

fn split_get_first(&self, splitter: Option<String>) -> String

Source§

fn split_get_last(&self, splitter: Option<String>) -> String

Source§

fn get_first_char(&self) -> Option<char>

Source§

fn trim_char(&self, trimmer: Option<String>) -> String

Source§

fn trim_start_char(&self, trimmer: Option<String>) -> String

Source§

fn trim_end_char(&self, trimmer: Option<String>) -> String

Source§

fn uppercase_first_letter(&self) -> String

Source§

fn lowercase_first_letter(&self) -> String

Source§

fn pascal_case(&self) -> String

Source§

fn camel_case(&self) -> String

Source§

fn snake_case(&self) -> String

Source§

fn on_one_line( &self, indent: Option<u64>, line_break: Option<bool>, replacer: Option<&str>, ) -> String

Source§

fn regex_extract( &self, regex_extractor: &str, regex_replacer: Option<&str>, separator: Option<&str>, ) -> Result<String, HelpersError>

Source§

fn regex_transform( &self, regex_pattern: &str, regex_replacer: &str, ) -> Result<String, HelpersError>

Implementors§