StringNameSpaceImpl in polars::prelude - Rust (original) (raw)

Trait StringNameSpaceImpl

Source

pub trait StringNameSpaceImpl: AsString {
Show 42 methods    // Provided methods
    fn hex_decode(&self) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn hex_encode(&self) -> ChunkedArray<StringType> { ... }
    fn base64_decode(&self) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn base64_encode(&self) -> ChunkedArray<StringType> { ... }
    fn to_integer(
        &self,
        base: &ChunkedArray<UInt32Type>,
        strict: bool,
    ) -> Result<ChunkedArray<Int64Type>, PolarsError> { ... }
    fn contains_chunked(
        &self,
        pat: &ChunkedArray<StringType>,
        literal: bool,
        strict: bool,
    ) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
    fn find_chunked(
        &self,
        pat: &ChunkedArray<StringType>,
        literal: bool,
        strict: bool,
    ) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... }
    fn str_len_chars(&self) -> ChunkedArray<UInt32Type> { ... }
    fn str_len_bytes(&self) -> ChunkedArray<UInt32Type> { ... }
    fn contains(
        &self,
        pat: &str,
        strict: bool,
    ) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
    fn contains_literal(
        &self,
        lit: &str,
    ) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
    fn find_literal(
        &self,
        lit: &str,
    ) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... }
    fn find(
        &self,
        pat: &str,
        strict: bool,
    ) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... }
    fn replace<'a>(
        &'a self,
        pat: &str,
        val: &str,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn replace_literal<'a>(
        &'a self,
        pat: &str,
        val: &str,
        n: usize,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn replace_all(
        &self,
        pat: &str,
        val: &str,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn replace_literal_all<'a>(
        &'a self,
        pat: &str,
        val: &str,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn extract(
        &self,
        pat: &ChunkedArray<StringType>,
        group_index: usize,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn extract_all(
        &self,
        pat: &str,
    ) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
    fn strip_chars(
        &self,
        pat: &Column,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn strip_chars_start(
        &self,
        pat: &Column,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn strip_chars_end(
        &self,
        pat: &Column,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn strip_prefix(
        &self,
        prefix: &ChunkedArray<StringType>,
    ) -> ChunkedArray<StringType> { ... }
    fn strip_suffix(
        &self,
        suffix: &ChunkedArray<StringType>,
    ) -> ChunkedArray<StringType> { ... }
    fn split_exact(
        &self,
        by: &ChunkedArray<StringType>,
        n: usize,
    ) -> Result<ChunkedArray<StructType>, PolarsError> { ... }
    fn split_exact_inclusive(
        &self,
        by: &ChunkedArray<StringType>,
        n: usize,
    ) -> Result<ChunkedArray<StructType>, PolarsError> { ... }
    fn splitn(
        &self,
        by: &ChunkedArray<StringType>,
        n: usize,
    ) -> Result<ChunkedArray<StructType>, PolarsError> { ... }
    fn split(
        &self,
        by: &ChunkedArray<StringType>,
    ) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
    fn split_inclusive(
        &self,
        by: &ChunkedArray<StringType>,
    ) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
    fn extract_all_many(
        &self,
        pat: &ChunkedArray<StringType>,
    ) -> Result<ChunkedArray<ListType>, PolarsError> { ... }
    fn extract_groups(
        &self,
        pat: &str,
        dtype: &DataType,
    ) -> Result<Series, PolarsError> { ... }
    fn count_matches(
        &self,
        pat: &str,
        literal: bool,
    ) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... }
    fn count_matches_many(
        &self,
        pat: &ChunkedArray<StringType>,
        literal: bool,
    ) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... }
    fn to_lowercase(&self) -> ChunkedArray<StringType> { ... }
    fn to_uppercase(&self) -> ChunkedArray<StringType> { ... }
    fn to_titlecase(&self) -> ChunkedArray<StringType> { ... }
    fn concat(
        &self,
        other: &ChunkedArray<StringType>,
    ) -> ChunkedArray<StringType> { ... }
    fn str_reverse(&self) -> ChunkedArray<StringType> { ... }
    fn str_slice(
        &self,
        offset: &Column,
        length: &Column,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn str_head(
        &self,
        n: &Column,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn str_tail(
        &self,
        n: &Column,
    ) -> Result<ChunkedArray<StringType>, PolarsError> { ... }
    fn str_escape_regex(&self) -> ChunkedArray<StringType> { ... }
}

Available on crate feature polars-ops only.

Source

Source

Source

Source

Source

Source

Source

Source

Get the length of the string values as number of chars.

Source

Get the length of the string values as number of bytes.

Source

Check if strings contain a regex pattern.

Source

Check if strings contain a given literal

Source

Return the index position of a literal substring in the target string.

Source

Return the index position of a regular expression substring in the target string.

Source

Replace the leftmost regex-matched (sub)string with another string

Source

Replace the leftmost literal (sub)string with another string

Source

Replace all regex-matched (sub)strings with another string

Source

Replace all matching literal (sub)strings with another string

Extract the nth capture group from pattern.

Extract each successive non-overlapping regex match in an individual string as an array.

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Extract each successive non-overlapping regex match in an individual string as an array.

Extract all capture groups from pattern and return as a struct.

Source

Count all successive non-overlapping regex matches.

Source

Count all successive non-overlapping regex matches.

Source

Modify the strings to their lowercase equivalent.

Source

Modify the strings to their uppercase equivalent.

Source

Modify the strings to their titlecase equivalent.

Source

Concat with the values from a second StringChunked.

Source

Reverses the string values

Source

Slice the string values.

Determines a substring starting from offset and with length length of each of the elements in array.offset can be negative, in which case the start counts from the end of the string.

Source

Slice the first n values of the string.

Determines a substring starting at the beginning of the string up to offset n of each element in array. n can be negative, in which case the slice ends n characters from the end of the string.

Source

Slice the last n values of the string.

Determines a substring starting at offset n of each element in array. n can be negative, in which case the slice begins n characters from the start of the string.

Source

Escapes all regular expression meta characters in the string.

Sourceยง