Countof
countof
Counts the number of non-overlapping occurrences of a substring within a string.
Spec
countof(source, search) Parameters
source - The string to search in.
search - The substring to count. Return Value
An int64: the number of non-overlapping occurrences. Example
datatable(val:string)["banana"]
| extend result = countof(val, "an") | val | result |
|---|---|
| banana | 2 |