System.AnsiStringBase.operator []

From Appmethod Libraries
Jump to: navigation, search

C++

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

Properties

Type Visibility Source Unit Parent
function public dstring.h System AnsiStringBase


Description

Returns the character at a specified index in the string.

This operator [] returns the byte in the string at index value idx. The operator [] assumes a base index of 1.

Note: If the string contains multi-byte characters, the operator [] may return a byte value that represents the wrong character and/or a partial character. For character-level access, use the SubString method.

See Also