using System; using System.Collections.Generic; using System.Text; namespace GreenTree.Strohrmann.ERP.Core.Extension { public static class StringExtension { /// /// Évaluates a string between a starting and an endling string part /// /// Base string. /// Beginning string part. /// Ending string part. public static string Between(this string str, string start, string end) { var startIndex = str.IndexOf(start) + start.Length; var endIndex = str.IndexOf(end, startIndex); return end == String.Empty ? str.Substring(startIndex) : str[startIndex..endIndex]; } } }