Returns the value of the character pointed to by the iterator plus the supplied offset. The offsets should preferably be small for reasons of efficiency as the method winds through the requested number of places each time. The envisiaged use is in tokenization or encoding where the percent sign followed by a percent sign is a percent but a percent sign followed by two hexidecimal characters is an 8-bit ASCII character. It is a convient means of a look ahead only.
| Return Type | Function name | Arguments |
|---|---|---|
| char | hzChain::Iter::operator[] | (uint32_t,) |
Declared in file: hzChain.h
Defined in file : hzChain.cpp
Function Logic:
Function body:
char hzChain::Iter::operator[] (uint32_t nOset)
{
// Returns the value of the character pointed to by the iterator plus the supplied offset. The offsets should preferably be small for reasons of efficiency
// as the method winds through the requested number of places each time. The envisiaged use is in tokenization or encoding where the percent sign followed
// by a percent sign is a percent but a percent sign followed by two hexidecimal characters is an 8-bit ASCII character. It is a convient means of a look
// ahead only.
//
// Arguments: 1) nOset Look ahead offset
//
// Returns: >0 The character at the relative position
// 0 If the current position plus the offset exeeds the chain length.
_hzfunc("hzChain::Iter::operator[]") ;
hzChain::Iter ci ; // Chain iterator
ci = *this ;
ci += nOset ;
return *ci ;
}