System::String::IndexOfAny méthode

String::IndexOfAny(char_t, int) const method

Recherche avant de caractère.

int System::String::IndexOfAny(char_t c, int startIndex=0) const
ParamètreTypeDescription
cchar_tCaractère à rechercher.
startIndexintIndice à partir duquel commencer la recherche.

ReturnValue

Indice de la première position de caractère depuis startIndex ou -1 si non trouvé.

Voir aussi

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

Recherche n’importe lequel des caractères fournis dans toute la chaîne. Compare le premier caractère de la chaîne à tous les caractères de anyOf, puis compare le deuxième et ainsi de suite. Retourne l’index du premier correspondant à l’un des caractères cibles.

int System::String::IndexOfAny(const ArrayPtr<char_t> &anyOf) const
ParamètreTypeDescription
anyOfconst ArrayPtr<char_t>&Array de caractères à rechercher. L’ordre n’a pas d’importance.

ReturnValue

Indice du premier caractère correspondant ou -1 si non trouvé.

Voir aussi

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

Recherche n’importe lequel des caractères fournis dans la sous-chaîne. Compare le premier caractère de la chaîne à tous les caractères de anyOf, puis compare le deuxième et ainsi de suite. Retourne l’index du premier correspondant à l’un des caractères cibles.

int System::String::IndexOfAny(const ArrayPtr<char_t> &anyOf, int32_t startindex) const
ParamètreTypeDescription
anyOfconst ArrayPtr<char_t>&Array de caractères à rechercher. L’ordre n’a pas d’importance.
startindexint32_tIndex à partir duquel commencer la recherche.

ReturnValue

Indice du premier caractère correspondant ou -1 si non trouvé.

Voir aussi

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

Recherche n’importe lequel des caractères fournis dans la sous-chaîne. Compare le premier caractère de la chaîne à tous les caractères de anyOf, puis compare le deuxième et ainsi de suite. Retourne l’index du premier correspondant à l’un des caractères cibles.

int System::String::IndexOfAny(const ArrayPtr<char_t> &anyOf, int32_t startindex, int32_t count) const
ParamètreTypeDescription
anyOfconst ArrayPtr<char_t>&Array de caractères à rechercher. L’ordre n’a pas d’importance.
startindexint32_tIndex à partir duquel commencer la recherche.
countint32_tNombre de caractères à parcourir.

ReturnValue

Indice du premier caractère correspondant ou -1 si non trouvé.

Voir aussi

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

Recherche donc tous les caractères de str dans ceci. Si le premier caractère est trouvé, sa position est renvoyée, sinon il recherche le deuxième et ainsi de suite.

int System::String::IndexOfAny(const String &str, int startIndex=0) const
ParamètreTypeDescription
strconst String&String des caractères à rechercher. L’ordre des caractères est important.
startIndexintPosition à partir de laquelle commencer la recherche.

ReturnValue

Indice du premier caractère trouvé ou -1 si aucun n’est trouvé.

Voir aussi