Skip to main content

str.capitalize

Return a copy of the expression with the first character capitalized and the rest lowercased.

str.center

Return the expression centered in a string of length width. Padding is done using the specified fill character.
int | IntegerValue
required
str | StringValue | None

str.contains

Return True if the expression contains the substring and False otherwise.
str | StringValue
required

str.convert_base

Convert the expression from one base to another.
IntegerValue
required
IntegerValue
required

str.endswith

Return True if the expression ends with the specified suffix and False otherwise.
str | StringValue
required

str.find

Return the position of the first occurrence of substring. Search is limited to the specified start and end positions, if provided. All indexes are 0-based.
str | StringValue
required
int | IntegerValue | None
int | IntegerValue | None

str.find_in_set

Return the position of the first occurrence of the expression in the list of strings.
list[str]
required

str.format

Return a formatted string using the expression as a format string. Note that only a subset of the python format string syntax is supported.
Any
required
Any
required

str.hash

Return the hash of the expression using the specified algorithm.
Literal['md5', 'sha1', 'sha256', 'sha512']
default:"sha256"
Literal['bytes', 'hex']
default:"hex"

str.join

Concatenate the elements of the list using the provided separator.
list[str | StringValue]
required

str.len

Return the number of non-overlapping occurrences of substring in the expression.
str | StringValue
required

str.levenshtein

Return the Levenshtein distance between the expression and the other string.
str | StringValue
required

str.ljust

Return the expression padded with the provided fill character to the specified length.
int | IntegerValue
required
str | StringValue | None
default:" "

str.lower

Return a copy of the expression with all characters lowercased.

str.lstrip

Return a copy of the expression with leading whitespace removed. Note: doesn’t support removing specific characters like the standard library function.

str.ord

Return the unicode code point of the first character of the expression.

str.repeat

Return the expression repeated n times.
int | IntegerValue
required

str.replace

Replace the matches of an exact (non-regex) pattern with a replacement string.
str | StringValue
required
str | StringValue
required

str.reverse

Return a copy of the expression with the characters reversed.

str.rjust

Return the expression padded with the provided fill character to the specified length.
int | IntegerValue
required
str | StringValue | None
default:" "

str.rstrip

Return a copy of the expression with trailing whitespace removed. Note: doesn’t support removing specific characters like the standard library function.

str.split

Split the expression using the specified delimiter.
str | StringValue
required

str.startswith

Return True if the expression starts with the specified prefix and False otherwise.
str | StringValue
required

str.strip

Return a copy of the expression with leading and trailing whitespace removed.

str.to_strptime

Parse a string into a timestamp using the specified strptime format.
str | StringValue
required