// ----------------------------------------------------------------------------- // file="TextHelper" // Project: StgSharp // Copyright (c) Nitload. // SPDX-License-Identifier: MIT // ----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StgSharp.RegularAnalysis.Text { public static class TextHelper { public static bool TryLastIndexOf( this ReadOnlySpan span, ReadOnlySpan value, out int index ) { index = span.LastIndexOf(value); return index != -1; } } }