HomeManualTopicsTypesSymbols
std::count_occurrences
returns the number of occurences of the specified expression
Parameters
- text
- the string to process
- expr
- the expression to count
Results
None
Description
This function returns the number of occurences of the specified expression in the string.
Example
$str "abcabc"
$occurrences count_occurrences(str 'b')
println! occurrences
Output
2
Topic
Strings