We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e48a4b2 commit 0bcdaabCopy full SHA for 0bcdaab
1 file changed
src/IGLib.Core/Console/Validation/Implementations/StringParsing/Parsers.cs
@@ -57,6 +57,22 @@ public bool TryParse(string text, out decimal value) =>
57
}
58
59
60
+ internal sealed class DoubleStringParser : IStringParser<double>
61
+ {
62
+ private readonly IFormatProvider _formatProvider;
63
+
64
+ public DoubleStringParser(IFormatProvider formatProvider)
65
66
+ _formatProvider = formatProvider;
67
+ }
68
69
+ public bool TryParse(string text, out double value) =>
70
+ double.TryParse(
71
+ text,
72
+ NumberStyles.Float | NumberStyles.AllowThousands,
73
+ _formatProvider,
74
+ out value);
75
76
77
78
0 commit comments