Afficher : Delphi C++
Préférences d'affichage

System.AnsiStringBase.operator []

De XE2 API Documentation

C++

char __fastcall operator [](const int idx) const
char& __fastcall operator [](const int idx)

Propriétés

Type Visibilité  Source Unité  Parent
function public dstring.h System AnsiStringBase


Description

Renvoie le caractère d'un indice spécifié dans une chaîne.

Cette operator [] renvoie l'octet situé dans la chaîne à l'indice idx. La operator [] utilise 1 comme indice de base.

Remarque :  Si la chaîne contient des caractères multi-octets, la operator [] peut renvoyer une valeur sur un octet représentant le caractère incorrect et/ou un caractère partiel. Pour un accès au niveau caractère, utilisez la méthode SubString.

Voir aussi

Versions précédentes
Traductions