Count occurrences of a substring: Difference between revisions

Added Pike implementation
({{header|SenseTalk}})
(Added Pike implementation)
Line 1,907:
: (countSubstring "ababababab" "abab")
-> 2</pre>
 
=={{header|Pike}}==
<lang Pike>
write("%d %d\n",
String.count("the three truths", "th"),
String.count("ababababab", "abab"));
</lang>
{{Out}}
<pre>
3 2
</pre>
 
=={{header|PL/I}}==
Anonymous user