,小弟我想取一个物料编码如 01.001.001 最后一个点号前面的部分 01.001 ,多谢
请教高手,我想取一个物料编码如 01.001.001 最后一个点号前面的部分 01.001 ,谢谢
请教高手,我想取一个物料编码如 01.001.001 最后一个点号前面的部分 01.001 ,谢谢
如 01.002.001 取01.002
111.01.002.001 取111.01.002
------解决方案--------------------
请教高手,我想取一个物料编码如 01.001.001 最后一个点号前面的部分 01.001 ,谢谢
如 01.002.001 取01.002
111.01.002.001 取111.01.002
------解决方案--------------------
- C# code
string s = "111.01.002.001"; string[] ss = s.Split('.'); s = ""; for (int i = 0; i < ss.Length-1; i++) { s += ss[i]+"."; } textBox1.Text = s.Trim('.');
------解决方案--------------------
- C# code
string str = "111.01.002.001"; Console.WriteLine(str.Substring(0, str.LastIndexOf(".001"))); /* 111.01.002 请按任意键继续. . . */
------解决方案--------------------
string str="111.01.002.001";
str=str.substring(0,str.LastIndexOf("."));
------解决方案--------------------
------解决方案--------------------