zoukankan      html  css  js  c++  java
  • C#取中间文本

     1         /// <summary>
     2         /// 取中间文本 + static string GetMiddleStr(string oldStr,string preStr,string nextStr)
     3         /// </summary>
     4         /// <param name="oldStr">原文</param>
     5         /// <param name="preStr">前文</param>
     6         /// <param name="nextStr">后文</param>
     7         /// <returns></returns>
     8         public static string GetMiddleStr(string oldStr, string preStr, string nextStr)
     9         {
    10             string tempStr = oldStr.Substring(oldStr.IndexOf(preStr) + preStr.Length);
    11             tempStr = tempStr.Substring(0, tempStr.IndexOf(nextStr));
    12             return tempStr;
    13         } 
  • 相关阅读:
    2018.11.12
    2018.11.8
    2018.11.7
    2018.11.6
    2018.11.5
    学习python课程第七天
    作业四.
    学习python课程第六天
    作业3
    学习python课程第五天
  • 原文地址:https://www.cnblogs.com/iack/p/3504863.html
Copyright © 2011-2022 走看看