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.

29 lines
542 B

  1. #include "stdafx.h"
  2. #include "strutil.h"
  3. BOOL IsValidX500Chars(CString csStringToCheck)
  4. {
  5. BOOL iReturn = TRUE;
  6. if (csStringToCheck.IsEmpty())
  7. {
  8. goto IsValidX500Chars_Exit;
  9. }
  10. // check if the string has any commas or semi colons
  11. if (csStringToCheck.Find(_T(',')) != -1)
  12. {
  13. iReturn = FALSE;
  14. goto IsValidX500Chars_Exit;
  15. }
  16. if (csStringToCheck.Find(_T(';')) != -1)
  17. {
  18. iReturn = FALSE;
  19. goto IsValidX500Chars_Exit;
  20. }
  21. IsValidX500Chars_Exit:
  22. return iReturn;
  23. }