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

大小写转换

时间:2014-11-14 20:59:07      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   ar   os   sp   div   on   

原文:大小写转换

using System.Text.RegularExpressions; 
  
string s = (12345678901234567890.123456789).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");
        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 str =  Regex.Replace(d, ".", delegate(Match m) { return "负元空零壹贰叁肆伍陆柒捌玖空空空空空空空分角拾佰仟萬億兆京垓秭穰"[m.Value[0] - ‘-‘].ToString(); });

大小写转换

标签:style   blog   http   io   ar   os   sp   div   on   

原文地址:http://www.cnblogs.com/lonelyxmas/p/4098047.html

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