GO-V.ORG
As seen in

contains

The contains function determines whether the first argument string contains the second argument string and returns boolean true or false.

The `contains` function determines whether the first argument string contains the second argument string and returns boolean true or false.

## Syntax

```plain
contains(haystack, needle)
```

### Parameters

- `haystack`
- : The string to be searched
- `needle`
- : The string to look for as a substring of `haystack`

### Return value

`true` if `haystack` contains `needle`. Otherwise, `false`.

## Specifications

[XPath 1.0 4.2](https://www.w3.org/TR/xpath-10/#function-contains)

## Gecko support

Supported.

source: MDN Web Docs mirror · page

Cite this

"contains". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/XML/XPath/Reference/Functions/contains

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·