aboutsummaryrefslogtreecommitdiffstats
path: root/README.rst
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@2e8.dk>2019-07-28 16:09:12 +0000
committerAsbjørn Sloth Tønnesen <ast@2e8.dk>2019-07-28 16:09:12 +0000
commitde97a7a8473f68eff527c1ec6fb2482ba3d31523 (patch)
treeef233bd3a10c6fd5c896095045e2968451e7029a /README.rst
parente4ef81a73657434575c7ceca81c7245ac8629b06 (diff)
downloadlua-inet-de97a7a8473f68eff527c1ec6fb2482ba3d31523.tar.gz
lua-inet-de97a7a8473f68eff527c1ec6fb2482ba3d31523.tar.xz
lua-inet-de97a7a8473f68eff527c1ec6fb2482ba3d31523.zip
set: contains: return the matching network
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/README.rst b/README.rst
index a6dfbc6..b37414a 100644
--- a/README.rst
+++ b/README.rst
@@ -474,13 +474,14 @@ Remove network from set.
``set:contains(foo)``
~~~~~~~~~~~~~~~~~~~~~
-Is the network contained or equal to a network in the set?
+If the network is contained or equal to a network in the set, then
+the matching network will be returned, otherwise false is.
::
- foo:contains(inet('2001:db8::')) -- returns true
+ foo:contains(inet('2001:db8::')) -- returns inet('2001:db8::/48')
foo:contains(inet('2001:db8::/32')) -- returns false
- foo:contains(inet('2001:db8::/48')) -- returns true
+ foo:contains(inet('2001:db8::/48')) -- returns inet('2001:db8::/48')
foo:contains(inet('2001:db8:1:2:3:4:5:6')) -- returns false
``set:flush()``