System::String::IndexOf method

String::IndexOf(char_t, int, int) const method

Character forward lookup in substring.

int System::String::IndexOf(char_t c, int startIndex, int count) const
ParameterTypeDescription
cchar_tCharacter to look for.
startIndexintIndex to start lookup at.
countintNumber of characters to look through.

ReturnValue

Index of first character position since startIndex or -1 if not found.

See Also

String::IndexOf(char_t, int) const method

Character forward lookup.

int System::String::IndexOf(char_t c, int startIndex=0) const
ParameterTypeDescription
cchar_tCharacter to look for.
startIndexintIndex to start lookup at.

ReturnValue

Index of first character position since startIndex or -1 if not found.

See Also

String::IndexOf(const String&, int, int) const method

Substring forward lookup.

int System::String::IndexOf(const String &str, int startIndex, int count) const
ParameterTypeDescription
strconst String&Substring to look for.
startIndexintPosition in source string to start lookup through.
countintnumber of characters to look through.

ReturnValue

Index of first found substring or -1 if not found. For empty lookup string, always returns startIndex.

See Also

String::IndexOf(const String&, int, System::StringComparison) const method

Substring forward lookup.

int System::String::IndexOf(const String &str, int startIndex, System::StringComparison comparison_type) const
ParameterTypeDescription
strconst String&Substring to look for.
startIndexintPosition in source string to start lookup through.
comparison_typeSystem::StringComparisonComparison mode.

ReturnValue

Index of first found substring or -1 if not found. For empty lookup string, always returns startIndex.

See Also

String::IndexOf(const String&, int) const method

Substring forward lookup.

int System::String::IndexOf(const String &str, int startIndex=0) const
ParameterTypeDescription
strconst String&Substring to look for.
startIndexintPosition in source string to start lookup through.

ReturnValue

Index of first found substring or -1 if not found. For empty lookup string, always returns startIndex.

See Also

String::IndexOf(const String&, System::StringComparison) const method

Substring forward lookup.

int System::String::IndexOf(const String &str, System::StringComparison comparison_type) const
ParameterTypeDescription
strconst String&Substring to look for.
comparison_typeSystem::StringComparisonComparison mode.

ReturnValue

Index of first found substring or -1 if not found. For empty lookup string, always returns 0.

See Also

String::IndexOf(const String&, int, int, System::StringComparison) const method

Substring forward lookup.

int System::String::IndexOf(const String &value, int startIndex, int count, System::StringComparison comparisonType) const
ParameterTypeDescription
valueconst String&Substring to look for.
startIndexintPosition in source string to start lookup through.
countintnumber of characters to look through.
comparisonTypeSystem::StringComparisonComparison mode.

ReturnValue

Index of first found substring or -1 if not found. For empty lookup string, always returns startIndex.

See Also