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

14 lines
351 B
C#
Raw Normal View History

2024-07-26 07:14:46 +00:00
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);
}
}
}