Anonymous user
Count occurrences of a substring: Difference between revisions
→{{header|MiniScript}}
Line 1,475:
=={{header|MiniScript}}==
<lang MiniScript>// Count occurrences of a Substring
string = "the three truths"
print string.split("th").len - 1
string = "ababababab"
print string.split("abab").len - 1</lang>
{{out}}
<pre>
|