containscount

containscount(haystack: text, needle: text) 🡒 number, const pure function

Returns the number of occurrences of the second argument within the first argument.

haystack = "Hello World!"
show summary "" a1c2 with
  containscount(haystack, "l") as "Contains 'l'?"         // '3'
  containscount(haystack, "World") as "Contains 'World'?" // '1'

The second argument is not allowed to be an empty text value.