码迷,mamicode.com
首页 > 其他好文 > 详细

人名币转大写

时间:2018-01-19 13:58:28      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:fun   return   div   大写   gate   ble   name   public   replace   

/// <summary>
/// 转换大写
/// </summary>
/// <param name="decValue"></param>
/// <param name="strFormat"></param>
/// <returns></returns>
public static string funString_BigRMB(this decimal decValue, string strFormat)
{
string s = decValue.ToString(strFormat).StringToDouble(0).ToString("#L#E#D#C#K#E#D#C#J#E#D#C#I#E#D#C#H#E#D#C#G#E#D#C#F#E#D#C#.0B0A");//d + "\n" +
string d = Regex.Replace(s, @"((?<=-|^)[^1-9]*)|((?‘z‘0)[0A-E]*((?=[1-9])|(?‘-z‘(?=[F-L\.]|$))))|((?‘b‘[F-L])(?‘z‘0)[0A-L]*((?=[1-9])|(?‘-z‘(?=[\.]|$))))", "${b}${z}");
string dxTotal = Regex.Replace(d, ".", delegate (Match m) { return "负元空零壹贰叁肆伍陆柒捌玖空空空空空空空分角拾佰仟万亿兆京垓秭穰"[m.Value[0] - ‘-‘].ToString(); }) + "整";
return dxTotal;
}

人名币转大写

标签:fun   return   div   大写   gate   ble   name   public   replace   

原文地址:https://www.cnblogs.com/it1042290135/p/8316078.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!