big-change:添加两种类型结构读写支持
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "public_def.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
@@ -37,7 +37,7 @@ void CUtil::sort_by_repeat(std::vector<std::string>& vec)
|
||||
std::size_t len1 = 0;
|
||||
std::size_t len2 = 0;
|
||||
std::size_t cur = 0;
|
||||
auto compare = [&](const std::string& str1, const std::string& str2) {
|
||||
auto compare = [&](const std::string& str1, const std::string& str2) {
|
||||
len1 = str1.size();
|
||||
len2 = str2.size();
|
||||
if (cur >= len1 || cur >= len2) {
|
||||
@@ -84,13 +84,12 @@ std::string CUtil::utf8_to_gbk(const std::string& utf8_str)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::vector<std::string> CUtil::splitString(const std::string& input, const std::string& delimiter)
|
||||
{
|
||||
std::vector<std::string> tokens;
|
||||
size_t pos = 0;
|
||||
std::string backup = input;
|
||||
std::string token;
|
||||
size_t pos = 0;
|
||||
std::string backup = input;
|
||||
std::string token;
|
||||
|
||||
while ((pos = backup.find(delimiter)) != std::string::npos) {
|
||||
token = backup.substr(0, pos);
|
||||
@@ -102,4 +101,3 @@ std::vector<std::string> CUtil::splitString(const std::string& input, const std:
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user