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
Namespace: PCBI_CadanceFab_ImportAssembly: PCBI_CadanceFab_Import (in PCBI_CadanceFab_Import.dll) Version: 16.0.0.0 (16.0.0.0)
public static int CountSubstring(
this string input,
string value,
int startIndex,
int count,
StringComparison comparisonType
)
<ExtensionAttribute>
Public Shared Function CountSubstring (
input As String,
value As String,
startIndex As Integer,
count As Integer,
comparisonType As StringComparison
) As Integer
public:
[ExtensionAttribute]
static int CountSubstring(
String^ input,
String^ value,
int startIndex,
int count,
StringComparison comparisonType
)
[<ExtensionAttribute>]
static member CountSubstring :
input : string *
value : string *
startIndex : int *
count : int *
comparisonType : StringComparison -> int
- 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
Int32The amount of occurrences of value within the inputStringIn 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).