mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-19 20:30:53 -05: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