Skip to content
Snippets Groups Projects
Commit 035f0a93 authored by rswindell's avatar rswindell
Browse files

Created a to_str() method to convert from a fido address object to a string

parent 11c07c2d
Branches
Tags
No related merge requests found
......@@ -56,4 +56,14 @@ function to_filename(addr)
return format("%04x%04x", addr.net, addr.node);
}
function to_str(addr)
{
if(typeof addr == "string")
return addr;
if(addr.point)
return format("%u:%u/%u.%u", addr.zone, addr.net, addr.node, addr.point);
return format("%u:%u/%u", addr.zone, addr.net, addr.node);
}
this;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment