cs-codex-dist-tests/Framework/Utils/Str.cs

14 lines
351 B
C#

namespace Utils
{
public static class Str
{
public static string Between(string input, string open, string close)
{
var openIndex = input.IndexOf(open) + open.Length;
var closeIndex = input.LastIndexOf(close);
return input.Substring(openIndex, closeIndex - openIndex);
}
}
}