StringExtensionsOccurrencesOf(String, String, StringComparison) Method
Counts the occurences of the specified string in the source String.
Namespace: DevCase.Extensions.StringExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static int OccurrencesOf(
this string sender,
string value,
StringComparison stringComparison
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function OccurrencesOf (
sender As String,
value As String,
stringComparison As StringComparison
) As Integer
Dim sender As String
Dim value As String
Dim stringComparison As StringComparison
Dim returnValue As Integer
returnValue = sender.OccurrencesOf(value,
stringComparison)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static int OccurrencesOf(
String^ sender,
String^ value,
StringComparison stringComparison
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member OccurrencesOf :
sender : string *
value : string *
stringComparison : StringComparison -> int
No code example is currently available or this language may not be supported.
- sender String
-
The source String.
- value String
-
The string to find.
- stringComparison StringComparison
-
The string-case rules to compare.
Int32
The amount of occurences of the specified string.
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).
This is a code example.
No code example is currently available or this language may not be supported.
MsgBox("Hello world!".OccurrencesOf("ll", StringComparison.Ordinal))
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.