Count occurrences of a substring: Difference between revisions
Content deleted Content added
m →[[Count_occurrences_of_a_substring#ALGOL 68]]: reduce # of test cases. |
→{{header|Perl}}: Added PureBasic |
||
Line 47: | Line 47: | ||
print countSubstring("the three truths","th"), "\n"; |
print countSubstring("the three truths","th"), "\n"; |
||
print countSubstring("ababababab","abab"), "\n";</lang> |
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}}== |
=={{header|Python}}== |