Skip to content

Commit

Permalink
Make float.Parse work independent of local culture (so it doesn't exp…
Browse files Browse the repository at this point in the history
…ect to parse 8,0 for "eight point zero" in France etc)
  • Loading branch information
joethephish committed Sep 6, 2016
1 parent 285d537 commit 343f638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inklecate/StringParser/StringParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ public string ParseUntil(ParseRule stopRule, CharacterSet pauseCharacters = null
if (ParseString (".") != null) {

var afterDecimalPointStr = ParseCharactersFromCharSet (numbersCharacterSet);
return float.Parse (leadingInt+"." + afterDecimalPointStr);
return float.Parse (leadingInt+"." + afterDecimalPointStr, System.Globalization.CultureInfo.InvariantCulture);
}
}

Expand Down

0 comments on commit 343f638

Please sign in to comment.