]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: Fill missing docs on STRCASEPREFIX() and STRSKIP()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Nov 2022 11:51:41 +0000 (12:51 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Nov 2022 11:15:03 +0000 (12:15 +0100)
We document use of our STR*() macros, but somehow missed
STRCASEPREFIX() and STRSKIP().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
docs/coding-style.rst

index d4c9d3b8ab8bc449ff6fb230703b7da4a3a8cee9..1faaf681e48bb3ee37a8f61adfaf3a697a7740eb 100644 (file)
@@ -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:
 
    ::