Skip to main content

COUNT_SUBSTR

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_SUBSTR(<string>, <substring>)

Also known as COUNT_SUBSTRING.

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