Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to

// <summary>
       ///if sToFind not found, then original string should be returned
       /// Otherwise removeBefore
       /// </summary>
       /// <param name="str"></param>
       /// <param name="sToFind"></param>
       /// <returns></returns>
       public static string RemoveBefore(this string str, string sToFind)
           int num1 = str.IndexOf(sToFind);
           if (num1 > 0)
               return str.Remove(0, num1);
               return str;

Posted on Thursday, May 12, 2011 6:30 AM .Net Framework | Back to top

Comments on this post: string RemoveBefore helper function

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: