Skip to main content
Version: v4.25

subnet

Casts an expression to a subnet value.

subnet(x:string) -> subnet

Description

The subnet function casts an expression to a subnet.

x: string

The string expression to cast.

Examples

Cast a string to a subnet

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

See Also

ip, int, uint, float, time, string