![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
天籁何人舞2512
这个作者很懒,什么都没留下…
展开
-
【C#】去除字符串中数字的小数点后多余的0
string a = “100.00”;string b = “”;try{b = Regex.Replace(a, “(\.[1-9])0$”, “$1”);//ResultString.TrimEnd(.); //todo}catch (ArgumentException ex){}Console.WriteLine(b);原创 2020-02-18 15:05:16 · 4190 阅读 · 0 评论 -
【C#】字符串string的常用使用方法
转自https://www.cnblogs.com/kakakade/p/4562467.html1—》字符串的声明:1、string s=new string(char[] arr) //根据一个字符数组声明字符串,即将字符字组转化为字符串。2、string s=new string(char r,int i) //生成 i 个字符 r 的字符串。2—》字符串常用的静态方法...转载 2020-02-18 15:00:00 · 192 阅读 · 0 评论