Skip to content

Commit

Permalink
Update Helper.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
SybexX authored Jul 17, 2024
1 parent d3d9c64 commit 132834c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions code/components/jomjol_helper/Helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,14 @@ void replaceAll(std::string& s, const std::string& toReplace, const std::string&

bool isStringNumeric(std::string &input)
{
if (input.size() <= 0)
{
return false;
}

// Replace comma with a dot
replaceString(input, ",", ".", false);

int start = 0;
int punkt_existiert_schon = 0;

Expand All @@ -1231,8 +1239,7 @@ bool isStringNumeric(std::string &input)

for (int i = start; i < input.size(); i++)
{
// if ((ispunct(input[i])) && (i > 0) && (punkt_existiert_schon == 0))
if (((input[i] == '.') || (input[i] == ',')) && (i > 0) && (punkt_existiert_schon == 0))
if ((input[i] == '.') && (i > 0) && (punkt_existiert_schon == 0))
{
punkt_existiert_schon = 1;
i++;
Expand Down

0 comments on commit 132834c

Please sign in to comment.