Count occurrences of a substring: Difference between revisions

→‎{{header|Perl}}: Added PureBasic
(→‎{{header|Perl}}: Added PureBasic)
Line 47:
print countSubstring("the three truths","th"), "\n";
print countSubstring("ababababab","abab"), "\n";</lang>
=={{header|PureBasic}}==
<lang PureBasic>a = CountString("the three truths","th")
b = CountString("ababababab","abab")
; a = 3
; b = 2</lang>
 
=={{header|Python}}==
Anonymous user