[PATCH 2/7] docs: Fill missing docs on STRCASEPREFIX() and STRSKIP()

Michal Privoznik mprivozn at redhat.com
Wed Nov 16 09:11:40 UTC 2022


We document use of our STR*() macros, but somehow missed
STRCASEPREFIX() and STRSKIP().

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 docs/coding-style.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/docs/coding-style.rst b/docs/coding-style.rst
index d4c9d3b8ab..1faaf681e4 100644
--- a/docs/coding-style.rst
+++ b/docs/coding-style.rst
@@ -735,6 +735,21 @@ use one of the following semantically named macros
 
      STRPREFIX(a, b)
 
+-  For case insensitive equality of a prefix:
+
+   ::
+
+     STRCASEPREFIX(a, b)
+
+-  For skipping prefix:
+
+   ::
+
+     /* Instead of:
+      *   STRPREFIX(a, b) ? a + strlen(b) : NULL
+      * use: */
+     STRSKIP(a, b)
+
 -  To avoid having to check if a or b are NULL:
 
    ::
-- 
2.37.4



More information about the libvir-list mailing list