Ai
1 Star 0 Fork 0

水兵/Project1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
agori.cpp 771 Bytes
一键复制 编辑 原始数据 按行查看 历史
水兵 提交于 2020-04-01 15:57 +08:00 . 优化
#include"agori.h"
#include"diag.h"
vector<string> str_Split(string st, char cha){
vector<string> a;
st += cha;
string str;
str.clear();
For(i, 0, int(st.length()) - 1){
if (st[i] != cha){
str += st[i];
}
else{
string s;
s.push_back(cha);
if (st != s) a.push_back(str);
str.clear();
}
}
return a;
}
string str_toStringId(int tmp){
string id = to_string(tmp);
if (id.length() == 1) id = "00" + id;
else if (id.length() == 2) id = "0" + id;
return id;
}
bool str_isNum(string tmp){
For(i, 0, int(tmp.length()) - 1){
if (tmp[i] < '0' || tmp[i] > '9') return 0;
}
return 1;
}
int atoi(string st){
int s = 0;
For(i, 0, int(st.length()) - 1){
if (st[i] < '0' || st[i]>'9') return -1;
else s = s * 10 + st[i] - '0';
}
return s;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/Shbinging/Project1.git
git@gitee.com:Shbinging/Project1.git
Shbinging
Project1
Project1
master

搜索帮助