Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. int check_name_alphabet(const char * str)
  2. {
  3.     const char* tmp;
  4.  
  5.     if (!str || !*str)
  6.         return 0;
  7.  
  8.     if (strlen(str) < 2)
  9.         return 0;
  10.  
  11.     for (tmp = str; *tmp; ++tmp)
  12.     {
  13.         //fixx name ¢¯!¡Æ
  14.         unsigned char uc_tmp = *tmp;
  15.  
  16.         if (uc_tmp == 176 || uc_tmp == 33 || uc_tmp == 191 || uc_tmp == 60)
  17.             continue;
  18.         //fixx name ¢¯!¡Æ end
  19.         // ¾ËÆĺª°ú ¼öÀÚ¸¸ Çã¿ë
  20.         if (isdigit(*tmp) || isalpha(*tmp))
  21.             continue;
  22.         else
  23.             return 0;
  24.     }
  25.  
  26.     return check_name_independent(str);
  27. }
  28. // DISABLE_SPECIAL_CHAR_NAMING
  29. bool sjis_is_disable_name_char(const char* src)
  30. {
  31.     static const char* sjis_symbols = "?";
  32.  
  33.     if (strncmp(src, sjis_symbols, 2) == 0)
  34.         return true;
  35.  
  36.     return false;
  37. }
  38. // END_OF_DISABLE_SPECIAL_CHAR_NAMING
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement