méthode System::String::IndexOf

String::IndexOf(char_t, int, int) const method

Recherche avant de caractère dans la sous-chaîne.

int System::String::IndexOf(char_t c, int startIndex, int count) const
ParamètreTypeDescription
cchar_tCaractère à rechercher.
startIndexintIndice à partir duquel commencer la recherche.
countintNombre de caractères à parcourir.

ReturnValue

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

Voir aussi

String::IndexOf(char_t, int) const method

Recherche avant de caractère.

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

Recherche avant dans la sous-chaîne.

int System::String::IndexOf(const String &str, int startIndex, int count) const
ParamètreTypeDescription
strconst String&Sous-chaîne à rechercher.
startIndexintPosition dans la chaîne source où commencer la recherche.
countintnombre de caractères à parcourir.

ReturnValue

Indice de la première sous-chaîne trouvée ou -1 si non trouvée. Pour une chaîne de recherche vide, renvoie toujours startIndex.

Voir aussi

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

Recherche avant dans la sous-chaîne.

int System::String::IndexOf(const String &str, int startIndex, System::StringComparison comparison_type) const
ParamètreTypeDescription
strconst String&Sous-chaîne à rechercher.
startIndexintPosition dans la chaîne source où commencer la recherche.
comparison_typeSystem::StringComparisonMode Comparison.

ReturnValue

Indice de la première sous-chaîne trouvée ou -1 si non trouvée. Pour une chaîne de recherche vide, renvoie toujours startIndex.

Voir aussi

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

Recherche avant dans la sous-chaîne.

int System::String::IndexOf(const String &str, int startIndex=0) const
ParamètreTypeDescription
strconst String&Sous-chaîne à rechercher.
startIndexintPosition dans la chaîne source où commencer la recherche.

ReturnValue

Indice de la première sous-chaîne trouvée ou -1 si non trouvée. Pour une chaîne de recherche vide, renvoie toujours startIndex.

Voir aussi

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

Recherche avant dans la sous-chaîne.

int System::String::IndexOf(const String &str, System::StringComparison comparison_type) const
ParamètreTypeDescription
strconst String&Sous-chaîne à rechercher.
comparison_typeSystem::StringComparisonMode Comparison.

ReturnValue

Indice de la première sous-chaîne trouvée ou -1 si non trouvée. Pour une chaîne de recherche vide, renvoie toujours 0.

Voir aussi

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

Recherche avant dans la sous-chaîne.

int System::String::IndexOf(const String &value, int startIndex, int count, System::StringComparison comparisonType) const
ParamètreTypeDescription
valeurconst String&Sous-chaîne à rechercher.
startIndexintPosition dans la chaîne source où commencer la recherche.
countintnombre de caractères à parcourir.
comparisonTypeSystem::StringComparisonMode Comparison.

ReturnValue

Indice de la première sous-chaîne trouvée ou -1 si non trouvée. Pour une chaîne de recherche vide, renvoie toujours startIndex.

Voir aussi