mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-26 02:29:59 -05:00
* Extract logic, finish impl for switch era * Extract trash checks to static class * Reduce some allocations in OT name compares
34 lines
693 B
C#
34 lines
693 B
C#
namespace PKHeX.Core;
|
|
|
|
public enum TrashMatch
|
|
{
|
|
/// <summary>
|
|
/// Expected under-layer of trash was not found.
|
|
/// </summary>
|
|
NotPresent,
|
|
|
|
NotEmpty,
|
|
|
|
/// <summary>
|
|
/// Displayed string is too long, with all bytes covering the initial trash.
|
|
/// </summary>
|
|
TooLongToTell,
|
|
|
|
/// <summary>
|
|
/// Expected under-layer of trash was found.
|
|
/// </summary>
|
|
Present,
|
|
|
|
PresentNone,
|
|
|
|
PresentSingle,
|
|
|
|
PresentMulti,
|
|
}
|
|
|
|
public static class TrashMatchExtensions
|
|
{
|
|
public static bool IsPresent(this TrashMatch match) => match >= TrashMatch.Present;
|
|
public static bool IsInvalid(this TrashMatch match) => match < TrashMatch.TooLongToTell;
|
|
}
|