std::string RemoveSpcSymbol(std::string strSource)//删除符号{char *str = strSource.c_str();char buf[MAX_PATH] = { 0 };int j = 0;for (int i = 0; i < strlen(str); i++){if (str[i] > 0 && str[i] < 0x7F){if (str[i] >= '0' && str[i] <= '9'){buf[j] = str[i]; j++;}if (str[i] >= 'A' && str[i] <= 'Z'){buf[j] = str[i]; j++;}if (str[i] >= 'a' && str[i] <= 'z'){buf[j] = str[i]; j++;}continue;}if ((unsigned char)str[i] >= 0xB0 && (unsigned char)str[i] <= 0xF7){if ((unsigned char)str[i + 1] >= 0xA0 && (unsigned char)str[i + 1] <= 0xFF){buf[j] = str[i]; j++; i++;buf[j] = str[i]; j++;continue;}}i++;}return buf;}
600字范文,内容丰富有趣,生活中的好帮手!