18 #ifndef YAMI4INDUSTRY_UTILS_H
19 #define YAMI4INDUSTRY_UTILS_H
51 int32_t
yami_strcmp(
const char s1[],
const char s2[]);
55 int32_t
yami_strncmp(
const char s1[],
const char s2[],
size_t n);
59 void yami_strncpy(
char dest[],
const char src[],
size_t n);
70 int32_t
yami_strfind(
const char s[],
char c,
size_t from,
size_t to);
75 const uint8_t src[],
size_t src_from,
size_t n);
103 size_t from,
size_t to, uint32_t * out_value);
115 size_t from,
size_t to, uint8_t * out_value);
int32_t yami_string_to_uint8(const char buf[], size_t from, size_t to, uint8_t *out_value)
Converts nul-terminated string to uint8_t.
Definition: utils.c:340
int32_t yami_string_to_uint32(const char buf[], size_t from, size_t to, uint32_t *out_value)
Converts nul-terminated string to uint32_t.
Definition: utils.c:297
void yami_memcpy(uint8_t dest[], size_t dest_from, const uint8_t src[], size_t src_from, size_t n)
Replacement for standard memcpy.
Definition: utils.c:200
size_t yami_round_up_to_8(size_t v)
Rounds the given value to the nearest 8 (for alignment).
Definition: utils.c:50
int32_t yami_strfind(const char s[], char c, size_t from, size_t to)
Finds the given character in nul-terminated string.
Definition: utils.c:179
int32_t yami_uint32_to_string(uint32_t v, char buf[], size_t buf_from, size_t buf_size)
Converts uint32_t to string format.
Definition: utils.c:223
int32_t yami_strcmp(const char s1[], const char s2[])
Replacement for standard strcmp.
Definition: utils.c:106
void yami_strncpy(char dest[], const char src[], size_t n)
Replacement for standard strncpy.
Definition: utils.c:158
size_t yami_strlen(const char s[])
Replacement for standard strlen.
Definition: utils.c:93
void yami_bzero(uint8_t dest[], size_t n)
Replacement for standard bzero.
Definition: utils.c:212
int32_t yami_strncmp(const char s1[], const char s2[], size_t n)
Replacement for standard strncmp.
Definition: utils.c:134
size_t yami_round_up_to_4(size_t v)
Rounds the given value to the nearest 4 (for alignment).
Definition: utils.c:23