Skip to main content Skip to complementary content

SubStringCount Script and chart function

SubStringCount() returns the number of occurrences of the specified substring in the input string text. If there is no match, 0 is returned.

Syntax:  

SubStringCount(text, sub_string)

Return data type: integer

Arguments
Argument Description
text The original string.
sub_string A string which may occur one or more times within the input string text.
Example: Chart expressions
Example Result
SubStringCount( 'abcdefgcdxyz', 'cd' ) Returns 2
SubStringCount( 'abcdefgcdxyz', 'dc' ) Returns 0

Example - SubStringCount fundamentals

Example - SubStringCount scenario

Example - SubStringCount scenario parsing nested data

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!