Substring() 截取
生活随笔
收集整理的這篇文章主要介紹了
Substring() 截取
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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); //--------------------19610804string fileName = "Program.cs";
string strName = fileName.Substring(0,fileName.IndexOf('.')); //------------Program
string strExten = fileName.Substring(fileName.IndexOf('.')); //---------------.cs
轉載于:https://www.cnblogs.com/imtudou/p/11251683.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的Substring() 截取的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 从List分组后重新组织数据
- 下一篇: Sql 行转列 STUFF