My Project
|
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
#include "include/decpoint.h"
Functions | |
int | dec_comma_is (char *str) |
double | atof_dpi (char *str) |
int | dec_nr (char *str) |
int | atof_with_check (char *double_as_string, double *result_value) |
double atof_dpi | ( | char * | str | ) |
Replacement of atof(), which works whether string contains decimal dots or decimal commas. Possible commas are replaced by dots in the argument string.
Referenced by atof_with_check().
int atof_with_check | ( | char * | double_as_string, |
double * | result_value | ||
) |
Converts a string to float using strtod(), but if its return value is zero this function checks that argument string actually contains a number.
double_as_string | String which is converted to a double |
result_value | Pointer to the double float |
References atof_dpi().
int dec_comma_is | ( | char * | str | ) |
Checks whether argument string contains a decimal comma instead of dot.
int dec_nr | ( | char * | str | ) |
Returns the number of decimapl places in the argument string, representing a floating point value. String can contain either decimal dots or commas.