Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
String

Method String.count()


Method count

int count(string haystack, string needle)

Description

Count the number of non-overlapping times the string needle occurs in the string haystack . The special cases for the needle "" is that it occurs one time in the empty string, zero times in a one character string and between every character (length-1) in any other string.

See also

search() , `/()