代码
 string str = "12.0000";

            
string str1 = str.Substring(str.Length - 44);

            
if (str1.CompareTo("0000"> 0)
            {
                Response.Write(str);
            }
            
else
            {
                Response.Write(str.Substring(
0, str.Length - 5));
            }

 

 

代码
   string str = "12.0000";

            
string str1 = str.Substring(str.Length - 44);

            
if (str1.Substring(31).CompareTo("0"> 0)
            {
                Response.Write(str);
            }
            
else if (str1.Substring(21).CompareTo("0"> 0)
            {
                Response.Write(str.Substring(
0, str.Length - 1));
            }
            
else if (str1.Substring(11).CompareTo("0"> 0)
            {
                Response.Write(str.Substring(
0, str.Length - 2));
            }
            
else if (str1.Substring(01).CompareTo("0"> 0)
            {
                Response.Write(str.Substring(
0, str.Length - 3));
            }
            
else
            {
                Response.Write(str.Substring(
0, str.Length - 5));
            }

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
相关资源
相似解决方案