Struct polars_lazy::dsl::string::StringNameSpace
source · pub struct StringNameSpace(_);
strings
only.Expand description
Specialized expressions for Series
of DataType::Utf8
.
Implementations§
source§impl StringNameSpace
impl StringNameSpace
sourcepub fn contains_literal<S>(self, pat: S) -> Exprwhere
S: AsRef<str>,
pub fn contains_literal<S>(self, pat: S) -> Exprwhere
S: AsRef<str>,
Check if a string value contains a literal substring.
sourcepub fn contains<S>(self, pat: S) -> Exprwhere
S: AsRef<str>,
pub fn contains<S>(self, pat: S) -> Exprwhere
S: AsRef<str>,
Check if a string value contains a Regex substring.
sourcepub fn ends_with<S>(self, sub: S) -> Exprwhere
S: AsRef<str>,
pub fn ends_with<S>(self, sub: S) -> Exprwhere
S: AsRef<str>,
Check if a string value ends with the sub
string.
sourcepub fn starts_with<S>(self, sub: S) -> Exprwhere
S: AsRef<str>,
pub fn starts_with<S>(self, sub: S) -> Exprwhere
S: AsRef<str>,
Check if a string value starts with the sub
string.
sourcepub fn extract(self, pat: &str, group_index: usize) -> Expr
pub fn extract(self, pat: &str, group_index: usize) -> Expr
Extract a regex pattern from the a string value.
sourcepub fn extract_all(self, pat: Expr) -> Expr
pub fn extract_all(self, pat: Expr) -> Expr
Extract each successive non-overlapping match in an individual string as an array
sourcepub fn count_match(self, pat: &str) -> Expr
pub fn count_match(self, pat: &str) -> Expr
Count all successive non-overlapping regex matches.
pub fn strptime(self, options: StrpTimeOptions) -> Expr
temporal
only.sourcepub fn concat(self, delimiter: &str) -> Expr
Available on crate feature concat_str
only.
pub fn concat(self, delimiter: &str) -> Expr
concat_str
only.Concat the values into a string array.
Arguments
delimiter
- A string that will act as delimiter between values.
sourcepub fn split(self, by: &str) -> Expr
pub fn split(self, by: &str) -> Expr
Split the string by a substring. The resulting dtype is List<Utf8>
.
sourcepub fn split_inclusive(self, by: &str) -> Expr
pub fn split_inclusive(self, by: &str) -> Expr
Split the string by a substring and keep the substring. The resulting dtype is List<Utf8>
.
sourcepub fn split_exact(self, by: &str, n: usize) -> Expr
Available on crate feature dtype-struct
only.
pub fn split_exact(self, by: &str, n: usize) -> Expr
dtype-struct
only.Split exactly n
times by a given substring. The resulting dtype is DataType::Struct
.
sourcepub fn split_exact_inclusive(self, by: &str, n: usize) -> Expr
Available on crate feature dtype-struct
only.
pub fn split_exact_inclusive(self, by: &str, n: usize) -> Expr
dtype-struct
only.Split exactly n
times by a given substring and keep the substring.
The resulting dtype is DataType::Struct
.
sourcepub fn splitn(self, by: &str, n: usize) -> Expr
Available on crate feature dtype-struct
only.
pub fn splitn(self, by: &str, n: usize) -> Expr
dtype-struct
only.Split by a given substring, returning exactly n
items. If there are more possible splits,
keeps the remainder of the string intact. The resulting dtype is DataType::Struct
.
sourcepub fn strip(self, matches: Option<String>) -> Expr
pub fn strip(self, matches: Option<String>) -> Expr
Remove leading and trailing characters, or whitespace if matches is None.
sourcepub fn lstrip(self, matches: Option<String>) -> Expr
pub fn lstrip(self, matches: Option<String>) -> Expr
Remove leading characters, or whitespace if matches is None.
sourcepub fn rstrip(self, matches: Option<String>) -> Expr
pub fn rstrip(self, matches: Option<String>) -> Expr
Remove trailing characters, or whitespace if matches is None..
sourcepub fn to_lowercase(self) -> Expr
pub fn to_lowercase(self) -> Expr
Convert all characters to lowercase.
sourcepub fn to_uppercase(self) -> Expr
pub fn to_uppercase(self) -> Expr
Convert all characters to uppercase.