Count occurrences of a substring: Difference between revisions
Content deleted Content added
Add Seed7 example |
|||
Line 377: | Line 377: | ||
2 |
2 |
||
2</pre> |
2</pre> |
||
=={{header|K}}== |
|||
The dyadic verb _ss gives the positions of substring y in string x. |
|||
<lang K> "the three truths" _ss "th" |
|||
0 4 13 |
|||
#"the three truths" _ss "th" |
|||
3 |
|||
"ababababab" _ss "abab" |
|||
0 4 |
|||
#"ababababab" _ss "abab" |
|||
2 |
|||
</lang> |
|||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |