Prefer C atoi/atof functions

Improve MinGW compatibility as std::stoi, std::stof are disabled.
Do not use regular expressions any longer

The decision is make based on MinGW compatibility issues.
Use per-character checks instead.