Skip to main content
Version: Next

subnet

Casts an expression to a subnet mask.

subnet(x:string) -> subnet

Description

The sub function casts the provided string x to a subnet

Examples

Cast a string to an IP address

from {x: subnet("1.2.3.4/16")}
{x: 1.2.0.0/16}

See Also

ip, int, uint, float, time, string