src/cx/string.h

changeset 1297
0811fb9a8dba
parent 1224
e20e100fa71f
--- a/src/cx/string.h	Tue Apr 15 22:16:05 2025 +0200
+++ b/src/cx/string.h	Wed Apr 16 20:35:34 2025 +0200
@@ -39,6 +39,12 @@
 #include "common.h"
 #include "allocator.h"
 
+/** Expands a UCX string as printf arguments. */
+#define CX_SFMT(s) (int) (s).length, (s).ptr
+
+/** Format specifier for a UCX string */
+#define CX_PRIstr ".*s"
+
 /**
  * The maximum length of the "needle" in cx_strstr() that can use SBO.
  */

mercurial