contains

Description

Returns true if the str string contains the expr string (case-sensitive). For backwards compatibility reasons, this also accepts variant input values, attempts to coerce them to type string, and checks whether that coerced string contains the given substring.

See also search

Return type

bool

Domain

This is a scalar function (calculates a single output value for a single input row.)

Categories

Usage

contains(haystack, needle)

Argument

Type

Optional

Repeatable

Restrictions

haystack

string

no

no

none

needle

string

no

no

none

Examples

filter contains(@.bundle_kind, "kube")

Pass through all bundle kinds that contain the string “kube”.