aboutsummaryrefslogtreecommitdiff
path: root/util.h
blob: b8936abdeb3d0d354123b6c0575186f062928466 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef H_UTIL
#define H_UTIL

#include <inttypes.h>
#include <sds/sds.h>
#include <regex.h>

uint16_t inet_atop(const char *port);
void herr(int output, const char* funcName);
void herrc(int output, const char* funcName);

sds gsub(sds str, const regex_t* regex, const char* repl);
sds gsub_getm(sds str, const regex_t *regex, const char* repl, int* *matches, int *matchesCount);

int digits(int num);

#endif