22 uint_fast64_t res = strtol(str,
const_cast<char**
>(end), 10);
24 STORM_LOG_ERROR(
"Error while parsing integer. Next input token is not a number.");
25 STORM_LOG_ERROR(
"\tUpcoming input is: \"" << std::string(str, 0, 16) <<
"\"");
26 throw storm::exceptions::WrongFormatException(
"Error while parsing integer. Next input token is not a number.");
40 double res = strtod(str,
const_cast<char**
>(end));
42 STORM_LOG_ERROR(
"Error while parsing floating point. Next input token is not a number.");
43 STORM_LOG_ERROR(
"\tUpcoming input is: \"" << std::string(str, 0, 16) <<
"\"");
44 throw storm::exceptions::WrongFormatException(
"Error while parsing floating point. Next input token is not a number.");
56 while (!isspace(*buf) && *buf !=
'\0') buf++;
67 while (isspace(*buf)) buf++;
75 return buffer + strcspn(buffer,
"\n\r\0");
83 while ((*lineEnd ==
'\n') || (*lineEnd ==
'\r')) lineEnd++;
#define STORM_LOG_ERROR(message)
char const * forwardToLineEnd(char const *buffer)
Encapsulates the usage of function @strcspn to forward to the end of the line (next char is the newli...
char const * skipWord(char const *buf)
Skips all numbers, letters and special characters.
double checked_strtod(char const *str, char const **end)
Calls strtod() internally and checks if the new pointer is different from the original one,...
uint_fast64_t checked_strtol(char const *str, char const **end)
Calls strtol() internally and checks if the new pointer is different from the original one,...
char const * forwardToNextLine(char const *buffer)
Encapsulates the usage of function @strchr to forward to the next line.
char const * trimWhitespaces(char const *buf)
Skips spaces, tabs, newlines and carriage returns.