stockInfo.Code = str[0].Substring(str[0].IndexOf("_str_"), str[0].IndexOf("=") - str[0].IndexOf("_str_")).Replace("_str_","");//股票编码


--去掉最后一个字符串
appendStr.Substring(0, appendStr.Length-1)


--C# Substring() 截取字符串的用法
string id = "123456196108047890";
string birthdate = id.Substring(6);      //------------------196108047890
string brithdate = id.Substring(6,8); //--------------------19610804
 
 
 string fileName = "Program.cs";
string strName = fileName.Substring(0,fileName.IndexOf('.'));  //------------Program
string strExten = fileName.Substring(fileName.IndexOf('.'));  //---------------.cs

相关文章:

  • 2021-11-30
  • 2021-12-19
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-02-04
  • 2022-03-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案