System::String::IndexOfAny method

String::IndexOfAny(char_t, int) const method

Character forward lookup.

int System::String::IndexOfAny(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::IndexOfAny(const String&, int) const method

Consequently looks for all characters of str in this. If first character is found, its position is returned, otherwise looks for the second one and so on.

int System::String::IndexOfAny(const String &str, int startIndex=0) const
ParameterTypeDescription
strconst String&String of characters to look for. Order of characters matters.
startIndexintPosition to start lookup from.

ReturnValue

Index of first found character or -1 if none is found.

See Also

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

Looks for any of passed characters through the whole string. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters.

int System::String::IndexOfAny(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 first matching character or -1 if not found.

See Also

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

Looks for any of passed characters through substring. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters.

int System::String::IndexOfAny(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 first matching character or -1 if not found.

See Also

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

Looks for any of passed characters through substring. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters.

int System::String::IndexOfAny(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 first matching character or -1 if not found.

See Also