Merge pull request #95 from chenzw95/mono-fixes

Trim underscores in Util.ToInt32 and Util.ToUInt32
This commit is contained in:
Kaphotics 2016-04-04 09:34:35 -07:00
commit 088996f4ce

View file

@ -184,11 +184,11 @@ namespace PKHeX
// Data Retrieval
internal static int ToInt32(string value)
{
return string.IsNullOrWhiteSpace(value) ? 0 : int.Parse(value.Trim());
return string.IsNullOrWhiteSpace(value) ? 0 : int.Parse(value.Trim(new char[2] { ' ', '_' }));
}
internal static uint ToUInt32(string value)
{
return string.IsNullOrWhiteSpace(value) ? 0 : uint.Parse(value.Trim());
return string.IsNullOrWhiteSpace(value) ? 0 : uint.Parse(value.Trim(new char[2] { ' ', '_' }));
}
internal static uint getHEXval(string s)
{