Corewar documentation 1.0.0
Loading...
Searching...
No Matches
my_getnbr_float.c File Reference

The file containing the my_getnbr_float function. More...

#include "my.h"

Functions

float my_getnbr_float (char const *str)
 Returns a float number starting from a string number (str)
 

Detailed Description

The file containing the my_getnbr_float function.

Author
Nicolas TORO

Function Documentation

◆ my_getnbr_float()

float my_getnbr_float ( char const * str)

Returns a float number starting from a string number (str)

Note
Returns 0 if the string is not a number
The function accept only -0123456789.
The function accept only one point in the string
Parameters
strThe string to convert
Returns
float The number found in the string
Author
Nicolas TORO