Files
sharpcompress/src/SharpCompress/Polyfills/StringExtensions.cs

14 lines
319 B
C#
Raw Normal View History

#if LEGACY_DOTNET
2022-12-20 15:06:44 +00:00
namespace SharpCompress;
internal static class StringExtensions
{
2022-12-20 15:20:49 +00:00
internal static bool EndsWith(this string text, char value) =>
text.Length > 0 && text[text.Length - 1] == value;
2022-12-20 15:20:49 +00:00
internal static bool Contains(this string text, char value) => text.IndexOf(value) > -1;
}
2022-12-20 13:45:47 +00:00
#endif