Пример #1
0
void CTableTitle::ExtractOHReplayFrameNumber(const CString *s) {
  if (s->GetLength() < 8) {
    return;
  }
  if (RightCharacter(*s) != ']') {
    return;
  }
  if (RightCharacter(*s, 7) != '[') {
    return;
  }
  // Title-format: #################[003141]
  // Extract frame-number
  int length = s->GetLength();
  int start_pos = length - 7;
  CString framenumber = s->Mid(start_pos);
  framenumber.Truncate(6);
  _ohreplay_framenumber = atoi(framenumber);
}
int RightDigitCharacterToNumber(CString string, int index_from_right /* = 0 */) {
  assert(index_from_right >= 0);
  return DigitCharacterToNumber(RightCharacter(string, index_from_right));
}