42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
my_getnbr.c File Reference

The file containing the my_getnbr function. More...

#include "my.h"

Functions

int my_getnbr (char const *str)
 Returns an int number starting from a string number (str)
 

Detailed Description

The file containing the my_getnbr function.

Author
Nicolas TORO

Function Documentation

◆ my_getnbr()

int my_getnbr ( char const * str)

Returns an int number starting from a string number (str)

Note
Returns 0 if the string is not a number or if the number overflow
The function accept only -0123456789
Parameters
strThe string to convert
Returns
int The number found in the string
Author
Nicolas TORO