6 lines
144 B
Text
6 lines
144 B
Text
string.count = function(s)
|
|
return self.split(s).len - 1
|
|
end function
|
|
|
|
print "the three truths".count("th")
|
|
print "ababababab".count("abab")
|