Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
733 B

  1. // ============================================================================
  2. // Internet Code Set Detection: Base Class
  3. // ============================================================================
  4. #include "private.h"
  5. #include "detcbase.h"
  6. /******************************************************************************
  7. ********************** D E T E C T S T R I N G A **********************
  8. ******************************************************************************/
  9. int CINetCodeDetector::DetectStringA(LPCSTR lpSrcStr, int cchSrc)
  10. {
  11. BOOL fDetected = FALSE;
  12. while (cchSrc-- > 0) {
  13. if (fDetected = DetectChar(*lpSrcStr++))
  14. break;
  15. }
  16. if (!fDetected)
  17. (void)CleanUp();
  18. return GetDetectedCodeSet();
  19. }