Method String.substrCount
Count the number of times a substring is in a string.
-
Syntax
Integer String.substrCount(String s )
The function will return the number of times a certain substring appears in the string. If the string is the empty string 0 is returned. -
Parameters
String s- The substring to search for. If s is the empty string 0 is returned.
-
Return value
The number og times the substring
swas found in the string. -
Download
Source
Unless otherwise noted all code in the JSLab Standard Library is licensed as GPLv3. See http://www.gnu.org/licenses/gpl.html for the entire license.
