StringExtensionsIndexOfAll(String, String, Int32, Int32, StringComparison) Method
Searches for the specified string pattern within the source String,
and returns the zero-based index of all the occurrences.
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[] IndexOfAll(
this string str,
string find,
int startIndex,
int count,
StringComparison comparisonType
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function IndexOfAll (
str As String,
find As String,
startIndex As Integer,
count As Integer,
comparisonType As StringComparison
) As Integer()
Dim str As String
Dim find As String
Dim startIndex As Integer
Dim count As Integer
Dim comparisonType As StringComparison
Dim returnValue As Integer()
returnValue = str.IndexOfAll(find,
startIndex, count, comparisonType)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static array<int>^ IndexOfAll(
String^ str,
String^ find,
int startIndex,
int count,
StringComparison comparisonType
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member IndexOfAll :
str : string *
find : string *
startIndex : int *
count : int *
comparisonType : StringComparison -> int[]
No code example is currently available or this language may not be supported.
- str String
-
The source String.
- find String
-
The string pattern to find within the source String.
- startIndex Int32
-
The zero-based starting index of the search.
- count Int32
-
The number of character positions to search in the source String.
- comparisonType StringComparison
-
Determines the case-sensitivity in which the string search is performed.
Int32
The zero-based index of all the string occurrences within the source
String,
, or
if no occurrences found.
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.
Dim str As String = "Q,W,E,R,T,Y"
Dim indices As Integer() = str.IndexOfAll(","c, 0, str.Length, StringComparison.OrdinalIgnoreCase)
Console.WriteLine(String.Join(", ", indices))
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.