System::String::LastIndexOfAny method

String::LastIndexOfAny(const ArrayPtr<char_t>&) const method

Looks for any of passed characters through whole string backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found.

int System::String::LastIndexOfAny(const ArrayPtr<char_t> &anyOf) const
ParameterTypeDescription
anyOfconst ArrayPtr<char_t>&Array of characters to look for. Order doesn’t matter.

ReturnValue

Index of the last matching character or -1 if not found.

See Also

String::LastIndexOfAny(const ArrayPtr<char_t>&, int32_t) const method

Looks for any of passed characters through substring backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found.

int System::String::LastIndexOfAny(const ArrayPtr<char_t> &anyOf, int32_t startindex) const
ParameterTypeDescription
anyOfconst ArrayPtr<char_t>&Array of characters to look for. Order doesn’t matter.
startindexint32_tIndex to start lookup from.

ReturnValue

Index of the last matching character or -1 if not found.

See Also

String::LastIndexOfAny(const ArrayPtr<char_t>&, int32_t, int32_t) const method

Looks for any of passed characters through substring backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found.

int System::String::LastIndexOfAny(const ArrayPtr<char_t> &anyOf, int32_t startindex, int32_t count) const
ParameterTypeDescription
anyOfconst ArrayPtr<char_t>&Array of characters to look for. Order doesn’t matter.
startindexint32_tIndex to start lookup from.
countint32_tNumber of characters to look through.

ReturnValue

Index of the last matching character or -1 if not found.

See Also