Click or drag to resize

StringUtilsSubstringCount Method

Counts the number of matching substrings in the given string.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static int SubstringCount(
	string s,
	string sub,
	StringComparison cmp
)

Parameters

s
Type: SystemString
The string in which to search.
sub
Type: SystemString
The substring for which to search.
cmp
Type: SystemStringComparison
The type of comparison to use.

Return Value

Type: Int32
The number of instances of the substring in the string, zero if either string is null or empty.
See Also