fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 82: Count substring occurrences
Idiom # 82: Count substring occurrences
See
programming-idioms.org
:
Code
x := s.count t
What are effects?
Running Example
ex82 is s := "banana bo bana bandana" t := "ana" x := s.count t say "matches, no overlap: $x" say "matches, overlap : {(container.searchable_sequence s.utf8).count_matches_overlapping t.utf8}"
What are effects?
last changed: 2024-07-01
next: NYI: Idiom # 83: Regex with character repetition