6#ifndef D098E3F2_2EEB_4E1A_892A_156C7D7533C3
7#define D098E3F2_2EEB_4E1A_892A_156C7D7533C3
17typedef enum { STO_SUCCESS, STO_OVERFLOW, STO_UNDERFLOW, STO_INVALID } StoError;
27StoError
str_to_u8(
const char* str, uint8_t* result);
211StoError
str_to_bool(
const char* str,
bool* result);
StoError str_to_bool(const char *str, bool *result)
Converts a string to a boolean. Valid inputs are "true", "false", "yes", "no", "1",...
StoError str_to_uintptr(const char *str, uintptr_t *result)
Converts a string to a uintptr_t.
StoError str_to_ulong_base(const char *str, int base, unsigned long *result)
Converts a string to an unsigned long with a specified base.
StoError str_to_int_base(const char *str, int base, int *result)
Converts a string to an int with a specified base.
StoError str_to_float(const char *str, float *result)
Converts a string to a float.
StoError str_to_ulong(const char *str, unsigned long *result)
Converts a string to an unsigned long.
StoError str_to_u64(const char *str, uint64_t *result)
Converts a string to a uint64_t.
StoError str_to_i64(const char *str, int64_t *result)
Converts a string to an int64_t.
StoError str_to_u8(const char *str, uint8_t *result)
Converts a string to a uint8_t.
StoError str_to_uint(const char *str, unsigned int *result)
Converts a string to an unsigned int.
StoError str_to_u32(const char *str, uint32_t *result)
Converts a string to a uint32_t.
StoError str_to_double(const char *str, double *result)
Converts a string to a double.
StoError str_to_long_base(const char *str, int base, long *result)
Converts a string to a long with a specified base.
StoError str_to_u16(const char *str, uint16_t *result)
Converts a string to a uint16_t.
const char * sto_error_string(StoError code)
StoError str_to_i32(const char *str, int32_t *result)
Converts a string to an int32_t.
StoError str_to_i16(const char *str, int16_t *result)
Converts a string to an int16_t.
StoError str_to_i8(const char *str, int8_t *result)
Converts a string to an int8_t.
StoError str_to_long(const char *str, long *result)
Converts a string to a long.
StoError str_to_int(const char *str, int *result)
Converts a string to an int.