Show: Delphi
C++
Display Preferences
System.WideString.operator []
From XE2 API Documentation
C++
WideChar & __fastcall operator [](const int idx) { return Data[idx-1]; } const WideChar& __fastcall operator [](const int idx) const { return Data[idx-1]; }
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | wstring.h | System | WideString |
Description
Returns the character at a specified index in the string.
The operator [] returns the character in the string at index value idx. The operator [] assumes a base index of 1. For example, given the string 'Hello' and an index value of 2, the character returned would be 'e'.