tor_multipath_voip/src/url.c
2019-02-19 10:38:01 +01:00

12 lines
254 B
C

#include "url.h"
char* url_get_port(char* out, char* in) {
sscanf(in, "%*[a-z]:%*[a-z]:%*[a-zA-Z0-9.]:%[0-9]", out);
return out;
}
int url_get_port_int(char* in) {
int out;
sscanf(in, "%*[a-z]:%*[a-z]:%*[a-zA-Z0-9.]:%d", &out);
return out;
}