StringExtensionsCountSubstring(String, String, Int32, Int32, StringComparison) Method

Counts the total amount of occurrences of value at the end of the inputString with an explicitly defined comparisonType

Definition

Namespace: PCBI_CadanceFab_Import
Assembly: PCBI_CadanceFab_Import (in PCBI_CadanceFab_Import.dll) Version: 16.0.0.0 (16.0.0.0)
C#
public static int CountSubstring(
	this string input,
	string value,
	int startIndex,
	int count,
	StringComparison comparisonType
)

Parameters

input  String
The input string for which the total amount of occurrences of value should be counted
value  String
The string to find within the input string
startIndex  Int32
The position in this instance where the substring begins
count  Int32
The length of the substring.
comparisonType  StringComparison
The way startsWith should be compared to the input string

Return Value

Int32
The amount of occurrences of value within the inputString

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also