tor_multipath_voip/src/url.c

13 lines
254 B
C
Raw Normal View History

2019-02-19 09:38:01 +00:00
#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;
}