Method String.count()
- Method count
intcount(stringhaystack,stringneedle)- Description
Count the number of non-overlapping times the string
needleoccurs in the stringhaystack. 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