System::String::LastIndexOf method

String::LastIndexOf(char_t) const method

Character backward lookup.

int System::String::LastIndexOf(char_t value) const
ParameterTypeDescription
valuechar_tCharacter to look for.

ReturnValue

Index of last character position or -1 if not found.

See Also

String::LastIndexOf(char_t, int32_t) const method

Character backward lookup.

int System::String::LastIndexOf(char_t value, int32_t startIndex) const
ParameterTypeDescription
valuechar_tCharacter to look for.
startIndexint32_tIndex to start lookup at.

ReturnValue

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

See Also

String::LastIndexOf(char_t, int32_t, int32_t) const method

Character backward lookup.

int System::String::LastIndexOf(char_t value, int32_t startIndex, int32_t count) const
ParameterTypeDescription
valuechar_tCharacter to look for.
startIndexint32_tIndex to start lookup at.
countint32_tNumber of characters to look through

ReturnValue

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

See Also

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

Substring backward lookup.

int System::String::LastIndexOf(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 last found substring or -1 if not found. For empty lookup string, always returns string length.

See Also

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

Substring backward lookup.

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

ReturnValue

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

See Also

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

Substring backward lookup.

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

ReturnValue

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

See Also

String::LastIndexOf(const String&, int, int, StringComparison) const method

Substring backward lookup.

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

ReturnValue

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

See Also