Utility.cpp 220 B

123456789101112
  1. #include "stdafx.h"
  2. #include "Utility.h"
  3. int GetPostionFromStrAddr(CString addr)
  4. {
  5. int nStart = addr.Find('[');
  6. int nEnd = addr.Find(']');
  7. CString strPos = addr.Mid(nStart+1, nEnd-nStart-1);
  8. return atoi(strPos);
  9. }