Count occurrences of a substring: Difference between revisions
Content deleted Content added
Line 1,578: | Line 1,578: | ||
<lang nim>import strutils |
<lang nim>import strutils |
||
proc count(s, sub): int = |
proc count(s, sub: string): int = |
||
var i = 0 |
var i = 0 |
||
while true: |
while true: |