StringSegment.IndexOf Méthode

Définition

Surcharges

IndexOf(Char, Int32, Int32)

Obtient l’index de base zéro de la première occurrence du caractère c de ce StringSegment. La recherche commence à start et examine un nombre count spécifié de positions de caractères.

IndexOf(Char)

Obtient l’index de base zéro de la première occurrence du caractère c de ce StringSegment.

IndexOf(Char, Int32)

Obtient l’index de base zéro de la première occurrence du caractère c de ce StringSegment. La recherche commence à start.

IndexOf(Char, Int32, Int32)

Obtient l’index de base zéro de la première occurrence du caractère c de ce StringSegment. La recherche commence à start et examine un nombre count spécifié de positions de caractères.

public:
 int IndexOf(char c, int start, int count);
public int IndexOf (char c, int start, int count);
member this.IndexOf : char * int * int -> int
Public Function IndexOf (c As Char, start As Integer, count As Integer) As Integer

Paramètres

c
Char

Caractère Unicode à rechercher.

start
Int32

Position d’index de base zéro à laquelle la recherche commence.

count
Int32

Nombre de caractères à examiner.

Retours

Int32

Position d’index de base zéro de c à partir du début du StringSegment si ce caractère est trouvé, ou -1 s’il ne l’est pas.

Exceptions

start ou count est inférieur à zéro, ou start + count est supérieur à Length.

S’applique à

IndexOf(Char)

Obtient l’index de base zéro de la première occurrence du caractère c de ce StringSegment.

public:
 int IndexOf(char c);
public int IndexOf (char c);
member this.IndexOf : char -> int
Public Function IndexOf (c As Char) As Integer

Paramètres

c
Char

Caractère Unicode à rechercher.

Retours

Int32

Position d’index de base zéro de c à partir du début du StringSegment si ce caractère est trouvé, ou -1 s’il ne l’est pas.

S’applique à

IndexOf(Char, Int32)

Obtient l’index de base zéro de la première occurrence du caractère c de ce StringSegment. La recherche commence à start.

public:
 int IndexOf(char c, int start);
public int IndexOf (char c, int start);
member this.IndexOf : char * int -> int
Public Function IndexOf (c As Char, start As Integer) As Integer

Paramètres

c
Char

Caractère Unicode à rechercher.

start
Int32

Position d’index de base zéro à laquelle la recherche commence.

Retours

Int32

Position d’index de base zéro de c à partir du début du StringSegment si ce caractère est trouvé, ou -1 s’il ne l’est pas.

Exceptions

start est supérieur ou égal à Length, ou est inférieur à zéro.

S’applique à