#ifndef UTILS_H #define UTILS_H /** * Returns whether or not a string is a number. * * @param str A string */ int is_number(char *str); /** * Safely allocates memory to the heap. * * @param amount The amount of memory to allocate * @returns The allocated memory. */ void *malloc_s(unsigned long amount); /** * Converts a string to a unsigned integer. * * @param str A string * @param err A error destination * @returns A unsigned integer. */ unsigned int str_to_uint(char *str, char **err); #endif