Returns the (char) value of the Nth position in the buffer. A zero is returned if N is less than zero or overshoots the text part of the buffer
| Return Type | Function name | Arguments |
|---|---|---|
| const char | hzString::operator[] | (uint32_t,) |
Declared in file: hzString.h
Defined in file : hzString.cpp
Function Logic:
Function body:
const char hzString::operator[] (uint32_t nIndex)
{
// Returns the (char) value of the Nth position in the buffer.
//
// A zero is returned if N is less than zero or overshoots the text part of the buffer
//
// Arguments: 1) nIndex Position of char to be returned
//
// Returns: 0+ Value of the Nth byte in the string if N is less than the length of the string
_hzfunc("hzString::operator[]") ;
_strItem* thisCtl ; // This string's control area
if (!m_addr)
return 0;
thisCtl = _strXlate(m_addr) ;
if (nIndex > thisCtl->_getSize())
return 0;
return thisCtl->_data()[nIndex] ;
}