Logo Search packages:      
Sourcecode: wxwindows2.4 version File versions

char Accessor::SafeGetCharAt ( int  position,
char  chDefault = ' ' 
) [inline]

Safe version of operator[], returning a defined value for invalid position.

Definition at line 43 of file Accessor.h.

                                                           {
            if (position < startPos || position >= endPos) {
                  Fill(position);
                  if (position < startPos || position >= endPos) {
                        // Position is outside range of document 
                        return chDefault;
                  }
            }
            return buf[position - startPos];
      }


Generated by  Doxygen 1.6.0   Back to index