PKHeX/PKHeX.Core/Util/NetFramework/System.cs
Kurt 59fad0e8cf Minor tweaks
Extract some logic (origin markings)
Revise directives for NET7 targeting, remove old net5 refs
2022-08-05 16:18:42 -07:00

11 lines
433 B
C#

#if !NET6_0_OR_GREATER
namespace System;
public static class FutureFeatures
{
public static bool StartsWith(this string str, char value) => str.Length != 0 && str[0] == value;
public static bool Contains<T>(this ReadOnlySpan<T> data, T value) where T : IEquatable<T> => data.IndexOf(value) != -1;
public static bool Contains<T>(this Span<T> data, T value) where T : IEquatable<T> => data.IndexOf(value) != -1;
}
#endif