mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-26 15:49:57 -06:00
misc: chore: Move all GeneratedRegex methods into one static class with static instance accessors.
This commit is contained in:
@ -1,17 +1,9 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using Ryujinx.Common.Helper;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
|
||||
{
|
||||
public static partial class NumericCharacterValidation
|
||||
public static class NumericCharacterValidation
|
||||
{
|
||||
public static bool IsNumeric(char value)
|
||||
{
|
||||
Regex regex = NumericRegex();
|
||||
|
||||
return regex.IsMatch(value.ToString());
|
||||
}
|
||||
|
||||
[GeneratedRegex("[0-9]|.")]
|
||||
private static partial Regex NumericRegex();
|
||||
public static bool IsNumeric(char value) => Patterns.Numeric.IsMatch(value.ToString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user