LastIndexOfAny()

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

Arguments

ParameterTypeDescription
anyOfconst ArrayPtr<char_t>&Array of characters to look for. Order doesn’t matter.

Return Value

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

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

Arguments

ParameterTypeDescription
anyOfconst ArrayPtr<char_t>&Array of characters to look for. Order doesn’t matter.
startindexint32_tIndex to start lookup from.

Return Value

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

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

Arguments

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.

Return Value

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

See Also