![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
日常算法
凡天宁
这个作者很懒,什么都没留下…
展开
-
金额格式转换(千分位、小数点等)
/*** @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 · 655 阅读 · 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 · 989 阅读 · 0 评论