#include <inttypes.h>
#include <stdbool.h>
Go to the source code of this file.
Defines | |
#define | _TIFA_TOOL_UTILS_H_ |
Functions | |
bool | is_a_number (const char *const str_n, uint32_t length) |
Does a string str_n read as a number? | |
void | chomp (char *const str_n, uint32_t length) |
NULL terminates a string. |
Definition in file tool_utils.h.
#define _TIFA_TOOL_UTILS_H_ |
Standard include guard.
Definition at line 35 of file tool_utils.h.
void chomp | ( | char *const | str_n, | |
uint32_t | length | |||
) |
NULL
terminates a string.
NULL
terminates the string str_n
at the first occurence of a newline encountered. If no newline is found str_n
is left unchanged.
chomp
function. It's name should probably be changed to avoid possible confusion.[in] | str_n | The string to NULL terminate. |
[in] | length | The maximum length of the string to check. |
bool is_a_number | ( | const char *const | str_n, | |
uint32_t | length | |||
) |
Does a string str_n
read as a number?
Returns true
if the string str_n
represents a number in the decimal base, false
otherwise.
[in] | str_n | The string to check. |
[in] | length | The maximum length of the string to check. |