StringSegmentIndexOf(StringSegment, Int32, Int32, StringComparison) Method

Gets the zero-based index of the first occurrence of the specified value in this StringSegment using the specified startIndex, count and comparison.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public int IndexOf(
	StringSegment value,
	int startIndex,
	int count,
	StringComparison comparison = StringComparison.Ordinal
)

Parameters

value  StringSegment
The StringSegment to seek.
startIndex  Int32
The search starting position.
count  Int32
The number of character positions to examine.
comparison  StringComparison  (Optional)
A StringComparison value that specified the rules for the search. This parameter is optional.
Default value: Ordinal.

Return Value

Int32
The zero-based index position of value if that StringSegment is found, or -1 if it is not. If value is Empty, the return value is startIndex.

See Also