Content deleted Content added
→addSubnet: fix |
add containsIP |
||
Line 424:
collection:addSubnet('1.2.3.0/24')
collection:addSubnet(Subnet.new('1.2.3.0/24'))
</source>
=== containsIP ===
<source lang="lua">
collection:containsIP(ip)
</source>
Returns true if the collection contains the specified IP; otherwise returns false. The <var>ip</var> parameter can be a string or an [[#IPAddress|IPAddress]] object.
Examples:
<source lang="lua">
collection:containsIP('1.2.3.4')
collection:containsIP(IPAddress.new('1.2.3.4'))
</source>
|