removed iostream and boost-regex dependency in client_test

This commit is contained in:
Arvid Norberg
2009-05-13 01:02:06 +00:00
parent 85bf463e11
commit 8e3bd5154a
8 changed files with 392 additions and 290 deletions

View File

@@ -434,6 +434,16 @@ namespace libtorrent
return -1;
}
TORRENT_EXPORT bool is_hex(char const *in, int len)
{
for (char const* end = in + len; in < end; ++in)
{
int t = hex_to_int(*in);
if (t == -1) return false;
}
return true;
}
TORRENT_EXPORT bool from_hex(char const *in, int len, char* out)
{
for (char const* end = in + len; in < end; ++in, ++out)