KScript docs
EN

ip fields and methods

A field is a plain fact about the value, read with a dot and no brackets: $value.name. A method takes arguments or does work, and is called with ->: $value->name(arguments), or with the value piped in: $value |> name(arguments).

Fields

FieldTypeDescription
.is_loopbackboolTrue for 127.x.x.x and ::1.
.is_privateboolTrue for addresses that only work inside a network: 10.x, 172.16-31.x, 192.168.x, fc00::/7, and loopback and link-local ones.
.versionnumber4 or 6.

From KScript.Core

#ip->in(block: cidr) → bool

True when the address is in the block, such as '10.0.0.0/8'.
ParameterTakes
block requiredcidr
Example
<let name="x" type="ip" value="'192.168.0.12'" />
<echo>{ $x->in('192.168.0.0/16') }</echo>
$x: ip = '192.168.0.12'
echo $x->in('192.168.0.0/16')

Methods from any

Methods from string