strCount

Counts the number of occurrences of a substring in a string. Takes str (string to search), substring (substring to count). Returns the total number of non-overlapping occurrences of substring found within str.

String

Parameters & Returns

Parameters

str String
substring String

Returns

Int

Quick Summary

Counts the number of occurrences of a substring in a string. Takes str (string to search), substring (substring to count). Returns the total number of non-overlapping occurrences of substring found within str.

Technical Exegesis...

Returns the total number of non-overlapping occurrences of substring found within str. The search is case-sensitive.

Returns 0 if substring is empty, not found, or if either parameter is null. After finding a match, the search continues from the position after that match. Useful for analyzing text frequency or validating input.

Example

Example.bam
; No example implemented yet