Count occurrences of a substring: Difference between revisions

Content added Content deleted
Line 2,443:
=={{header|Smalltalk}}==
<lang smalltalk>Transcript showCR:('the three truths' occurrencesOfString:'th').
Transcript showCR:( 'ababababab' occurrencesOfString:'abab').</lang>
</lang>
{{out}}
<pre>3