摘要: C++中string没有自带的split()函数,需要自己实现 void split(const string& s, vector<int>& sv, const char flag = ' ') { sv.clear(); istringstream iss(s); string temp; w 阅读全文
posted @ 2020-06-10 23:14 sbj123456789 阅读(1178) 评论(0) 推荐(0) 编辑
摘要: find()函数 参数:字符子串 返回:该子串第一个字母的下标位置,如果没找到则返回 string_name.npos position = memory_string.find("KB"); if (position != memory_string.npos) { return stoi(mem 阅读全文
posted @ 2020-06-10 23:04 sbj123456789 阅读(267) 评论(0) 推荐(0) 编辑