count-substring
Returns an integer value expressing the number of times that substr occurs in string.
![mf-func-count-substring](./images/mf-func-count-substring.png)
Languages
Built-in, C++, C#, Java.
Parameters
Name | Type | Description |
---|---|---|
string | xs:string | The input string. |
substr | xs:string | The sub-string to test for. |
Example
The following mapping returns 2. This is the number of times that the pipe separator occurs within the input string id|name|email.
![mf-func-count-substring-example](./images/mf-func-count-substring-example.png)