日常算法
凡天宁
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
金额格式转换(千分位、小数点等)
/** * @param strValue: wstring going to be unified, return unified wstring * @param amountType: amount type for unify 0-,. 1-. 2-NA 3-, * @return true-normal false-error */ int CExSamples::unify_money(wstring& strValue, int amountType) { if(strValue.s原创 2022-02-16 17:52:44 · 790 阅读 · 0 评论 -
标准化金额:加小数点和逗号 / 加逗号 / 加小数点 / 纯数字
逗号部分代码部分参考:如何将数值,金额以逗号分隔 #include<iostream> #include<string> #include<cstdlib> using namespace std; int unify_money(string& strValue, int unifyType) { if(strValue.size() < 1) return false; //转化为纯数字 string strNum = ""; for(in原创 2021-11-11 17:23:19 · 1340 阅读 · 0 评论
分享