Skip to main content

COUNT_SUBSTRING

Deprecated version

This document refers to a deprecated version of the RQL programming language.

Please go here for documentation related to the latest supported version.

Count the number of occurrences of a substring in a string.

Syntax
COUNT_SUBSTRING(<string>, <substring>)

Also known as COUNT_SUBSTR.

Example
COUNT_SUBSTRING("aXbX", "X")    // 2
COUNT_SUBSTRING("aXbX", "y") // 0
COUNT_SUBSTRING("aXbX", "aX") // 1