aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@2e8.dk>2019-07-18 20:06:14 +0000
committerAsbjørn Sloth Tønnesen <ast@2e8.dk>2019-07-18 20:06:14 +0000
commit0a5fe9e3cd3d560fe81ea332baa95967c565a135 (patch)
tree9d19e0ca3764b8769798c80ae2f01a90b0e5a11c
parent7140c113b09266747c9add120e27b3e0eb017214 (diff)
downloadlua-inet-0a5fe9e3cd3d560fe81ea332baa95967c565a135.tar.gz
lua-inet-0a5fe9e3cd3d560fe81ea332baa95967c565a135.tar.xz
lua-inet-0a5fe9e3cd3d560fe81ea332baa95967c565a135.zip
readme: minor fixes
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
-rw-r--r--README.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/README.rst b/README.rst
index 208ddbd..146ccca 100644
--- a/README.rst
+++ b/README.rst
@@ -361,7 +361,7 @@ Sets
``set:list()``
~~~~~~~~~~~~~~
-list networks in set
+List networks in set.
::
@@ -370,7 +370,7 @@ list networks in set
``set:add(foo)``
~~~~~~~~~~~~~~~~
-add network to set
+Add network to set.
::
@@ -383,7 +383,7 @@ add network to set
``set:remove(foo)``
~~~~~~~~~~~~~~~~~~~
-remove network from set
+Remove network from set.
::
@@ -403,15 +403,19 @@ remove network from set
inet('2001:db8:0:8000::/49'),
}
+ foo:add(inet('2001:db8:0:4200::/56')) -- returns true
+ foo:list() -- returns { inet('2001:db8::/48') }
+
``set:contains(foo)``
~~~~~~~~~~~~~~~~~~~~~
-is network contained in set?
+Is the network contained or equal to a network in the set?
::
foo:contains(inet('2001:db8::')) -- returns true
foo:contains(inet('2001:db8::/32')) -- returns false
+ foo:contains(inet('2001:db8::/48')) -- returns true
foo:contains(inet('2001:db8:1:2:3:4:5:6')) -- returns false
``set:flush()``
@@ -421,7 +425,7 @@ Empties the set.
::
foo:flush() -- returns true
- foo:list() -- returns {}
+ foo:list() -- returns {}
History
=======