libcfe  0.12.1
some useful C-functions
char_to_double.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

short int check_double (const char *s, int len)
 
long double char_to_double (const char *s, int len)
 

Function Documentation

◆ char_to_double()

long double char_to_double ( const char *  s,
int  len 
)

Return the decimal number this string represents.

Parameters
[in]sThe string that contains the number.
[in]lenThe length of the string that s points to. If -1 is given the length is auto determined and a null terminated string is assumed.
Returns
The number that 's' represents.

Definition at line 38 of file char_to_double.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_double()

short int check_double ( const char *  s,
int  len 
)

Check if the string represents a decimal value.

Parameters
[in]sThe string that contains the number.
[in]lenThe length of the string that s points to. If -1 is given the length is auto determined and a null terminated string is assumed.
Returns
result:
  • 0 false, not a number
  • 1 true, this contains a number

Definition at line 14 of file char_to_double.c.

Here is the caller graph for this function: