mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-25 02:58:02 +02:00
Fixed IDE "Find on Stack" functionality
This commit is contained in:
parent
237b507745
commit
ac67046afc
5 changed files with 21 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
|||
using System.Globalization;
|
||||
namespace System
|
||||
{
|
||||
#unwarn
|
||||
|
@ -85,16 +86,16 @@ namespace System
|
|||
((uint32)this).ToString(outString, format, formatProvider);
|
||||
}
|
||||
|
||||
public static Result<uint, ParseError> Parse(StringView val)
|
||||
public static Result<uint, ParseError> Parse(StringView val, NumberStyles style = .Number, CultureInfo cultureInfo = null)
|
||||
{
|
||||
if (sizeof(Self) == sizeof(uint64))
|
||||
{
|
||||
var result = UInt64.Parse(val);
|
||||
var result = Int64.Parse(val, style, cultureInfo);
|
||||
return *(Result<uint, ParseError>*)&result;
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = UInt32.Parse(val);
|
||||
var result = Int32.Parse(val, style, cultureInfo);
|
||||
return *(Result<uint, ParseError>*)&result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue