src/ucx/string.h

changeset 283
c3b6ff227481
parent 259
2f5dea574a75
child 306
90b6d69bb499
     1.1 --- a/src/ucx/string.h	Wed May 02 20:55:23 2018 +0200
     1.2 +++ b/src/ucx/string.h	Wed May 02 21:45:52 2018 +0200
     1.3 @@ -58,6 +58,12 @@
     1.4  /** Shortcut for the conversion of a C string to a <code>sstr_t</code>. */
     1.5  #define S(s) sstrn((char*)s, sizeof(s)-1)
     1.6  
     1.7 +/** Expands a sstr_t to printf arguments. */
     1.8 +#define SFMT(s) (int) (s).length, (s).ptr
     1.9 +
    1.10 +/** Format specifier for a sstr_t. */
    1.11 +#define PRIsstr ".*s"
    1.12 +
    1.13  #ifdef	__cplusplus
    1.14  extern "C" {
    1.15  #endif

mercurial