aoc/include/advent_utility.h
2024-12-03 12:17:24 -08:00

22 lines
494 B
C

#ifndef ADVENT_H_UTILITY_
#define ADVENT_H_UTILITY_
#include "lfvector.h"
#define DEFAULT_DELIM " \t\n\r\f\v"
#define MAX(x, y) (x) > (y) ? (x) : (y)
#define MIN(x, y) (x) < (y) ? (x) : (y)
char *md5_str(const char *);
Vector *string_to_int_vector(const char *input_string, const char *delim);
int int_comp(const void *a, const void *b);
char **get_matches(char *in, char *pat, size_t *sz, size_t max_matches);
void free_matches(char **matches, size_t sz);
#endif