标签:ace param 引用 $1 string 应该 log tps sts
/// <summary>
/// 截取
/// </summary>
/// <param name="n">输入截取数字如-0.3412</param>
/// <param name="t">截取位数</param>
/// <returns></returns>
private double Floor(double n, double t)
{
var i = "^([-+]?[0-9]*.[0-9]{" + t + "})[0-9]*$";
string sRestult = Regex.Replace(n.ToString(), i, "$1");
return System.Convert.ToDouble(sRestult);
}
https://www.cnblogs.com/xinjianheyi/p/5791360.html
https://www.cnblogs.com/wangchuang/p/4271809.html
https://www.cnblogs.com/testsec/p/6095529.html
C#Regex中replace方法的替换自定义小数点后的内容
标签:ace param 引用 $1 string 应该 log tps sts
原文地址:https://www.cnblogs.com/TTonly/p/10349907.html