Count occurrences of a substring: Difference between revisions

Line 520:
-module(substrings).
-export([main/2]).
 
%% String and Sub exhausted, count a match and present result
match([], [], _OrigSub, Acc) ->
Acc+1;
 
%% String exhausted, present result
1

edit