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

The file containing the my_getnbr_base function. More...

#include "my.h"

Functions

int my_getnbr_base (char const *str, char const *base)
 Returns a number starting from a string number (str) in the requested base (base)
 

Detailed Description

The file containing the my_getnbr_base function.

Author
Nicolas TORO

Function Documentation

◆ my_getnbr_base()

int my_getnbr_base ( char const * str,
char const * base )

Returns a number starting from a string number (str) in the requested base (base)

Note
Returns 0 if the string is not a number
The function accept multiple signes in the string
Parameters
strThe string to convert
baseThe base of the number
Returns
int The number found in the string
Author
Nicolas TORO