feat(convert/atou): adding the atou function
- Can be usefull when the parsing of some project (like philosophers)
This commit is contained in:
parent
4e15449d12
commit
28be9d6b91
2 changed files with 51 additions and 1 deletions
|
|
@ -6,13 +6,15 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/31 14:57:24 by rparodi #+# #+# */
|
||||
/* Updated: 2025/09/05 16:07:54 by rparodi ### ########.fr */
|
||||
/* Updated: 2025/09/08 10:17:01 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CONVERT_H
|
||||
# define CONVERT_H
|
||||
|
||||
# include <stddef.h>
|
||||
|
||||
/**
|
||||
* @brief Converts integer to string
|
||||
*
|
||||
|
|
@ -29,6 +31,14 @@ char *ft_itoa(int n);
|
|||
*/
|
||||
int ft_atoi(const char *nptr);
|
||||
|
||||
/**
|
||||
* @brief Converts string to size_t
|
||||
*
|
||||
* @param nptr the string that will be converted
|
||||
* @return The unsigned long long on the string
|
||||
*/
|
||||
size_t ft_atou(const char *nptr);
|
||||
|
||||
/**
|
||||
* @brief Converts string to long long integer
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue