dev: Added a ft_itoa_static function to avoid malloc'ing and free'ing every frame

This commit is contained in:
Theo Champion 2025-08-20 15:29:33 +02:00
parent e8fac75779
commit 9ec4a33fc8
3 changed files with 77 additions and 2 deletions

View file

@ -6,7 +6,7 @@
/* By: tchampio <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/14 12:40:57 by tchampio #+# #+# */
/* Updated: 2024/12/18 04:40:53 by tchampio ### ########.fr */
/* Updated: 2025/08/20 15:26:09 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -54,6 +54,7 @@ char *ft_strjoin(const char *s1, const char *s2);
char *ft_strtrim(const char *s1, const char *set);
char **ft_split(const char *s, char separator);
char *ft_itoa(int n);
char *ft_itoa_static(int n, char *string, size_t buffersize);
char *ft_strmapi(const char *s, char (*f)(unsigned int, char));
void ft_striteri(char *s, void (*f)(unsigned int, char *));
void ft_putchar_fd(char c, int fd);