blob: 07f1af43872259a19ef63e87a5dae688a3fb1971 [file] [log] [blame]
#include "common_vector_test.h"
size_t strlength(const char *str) {
size_t index = 0;
while (str[index]) {
index++;
}
return index;
}
bool strequal(const char *str1, const char *str2) {
uint32_t index = 0;
while (str1[index] && str2[index] && str1[index] == str2[index]) {
index++;
}
return str1[index] == str2[index];
}
uint64_t random64(void) {
static uint64_t state = 4; // chosen by fair dice roll.
// guaranteed to be random.
state *= 1234512345;
state += 5432154321;
return state;
}