User Tools

Site Tools


syntax:functions:substringcount

This is an old revision of the document!


SubstringCount(text, look_for)

Category: Text function


Description

This function returns the number of instances of look_for found within text.


Arguments

ArgumentTypeDescription
textTextThe text value to search within for the look_for string.
look_forTextThe text string to search for within text.

Return value type: Number


Remarks

This function is case sensitive. To perform a case insensitive search, convert text to uppercase first using Upper(text).

Both arguments are implicitly converted to text values if required.


Examples

substringcount('one-two-three', '-') = 2
substringcount('192.168.110.1', '1') = 5
substringcount('Mississippi', 'S') = 0  //Case-sensitive, no capital "s"
substringcount(upper('Mississippi'), 'S') = 4  //Convert to uppercase first
substringcount(1000,0) = 3  //Numbers implicitly converted to text
syntax/functions/substringcount.1628489112.txt.gz · Last modified: 2021/08/09 02:05 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki