aboutsummaryrefslogtreecommitdiff
path: root/docs/built-in
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-09-10 20:39:15 -0400
committerBobby <[email protected]>2022-09-10 20:39:15 -0400
commit7b8661bd9ee0c7e88a68a3f8a5391f73a32138fa (patch)
treee951fb7c254cd6d2620cd0adf2a802e5daa3b5df /docs/built-in
parent55a13a4ab4004ca38177e1c8735df2341ad935b7 (diff)
downloadedify-7b8661bd9ee0c7e88a68a3f8a5391f73a32138fa.tar.xz
edify-7b8661bd9ee0c7e88a68a3f8a5391f73a32138fa.zip
Added docs for ipv4 and ipv6
Diffstat (limited to 'docs/built-in')
-rw-r--r--docs/built-in/index.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/built-in/index.rst b/docs/built-in/index.rst
index ff4a684..c9407ec 100644
--- a/docs/built-in/index.rst
+++ b/docs/built-in/index.rst
@@ -60,3 +60,35 @@ You can use the ``phone`` function as follows:
phone('123-456-7890') # returns True
phone('9012') # returns False
phone('+1 (615) 243-') # returns False
+
+
+ipv4()
+------
+
+The ``ipv4`` function verifies that a string is a valid IPv4 address. The function takes a ``string`` argument which is supposed to be a valid IPv4 address. The function returns ``True`` if the string is a valid IPv4 address, and ``False`` otherwise.
+
+You can use the ``ipv4`` function as follows:
+
+.. code-block:: python
+
+ from edify.library import ipv4
+
+ ipv4('128.128.128.128') # returns True
+ ipv4('128.128.128') # returns False
+
+
+ipv6()
+------
+
+The ``ipv6`` function verifies that a string is a valid IPv6 address. The function takes a ``string`` argument which is supposed to be a valid IPv6 address. The function returns ``True`` if the string is a valid IPv6 address, and ``False`` otherwise.
+
+You can use the ``ipv6`` function as follows:
+
+.. code-block:: python
+
+ from edify.library import ipv6
+
+ ipv6('2001:0db8:85a3:0000:0000:8a2e:0370:7334') # returns True
+ ipv6('2001:0db8:85a3:0000:0000:8a2e:0370') # returns False
+
+