| Extracted from Pike v7.8 release 700 at 2013-06-08.

[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() , `/()