31 lines
774 B
C#
31 lines
774 B
C#
// -----------------------------------------------------------------------------
|
|
// 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<char> span,
|
|
ReadOnlySpan<char> value,
|
|
out int index
|
|
)
|
|
{
|
|
index = span.LastIndexOf(value);
|
|
return index != -1;
|
|
}
|
|
|
|
}
|
|
}
|