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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux