Skip to content

strCount JavaScriptDart

Returns the number of times the second String argument is contained in the first String argument.

Parameters

  • str::string
  • search::string

Returns

number

Examples

javascript
strCount('abcabc', 'a'); // Returns 2

Released under the MIT License