src/ucx/string.h

changeset 283
c3b6ff227481
parent 259
2f5dea574a75
child 306
90b6d69bb499
equal deleted inserted replaced
282:39e69d78b01d 283:c3b6ff227481
56 #define ST(s) { (char*)s, sizeof(s)-1 } 56 #define ST(s) { (char*)s, sizeof(s)-1 }
57 57
58 /** Shortcut for the conversion of a C string to a <code>sstr_t</code>. */ 58 /** Shortcut for the conversion of a C string to a <code>sstr_t</code>. */
59 #define S(s) sstrn((char*)s, sizeof(s)-1) 59 #define S(s) sstrn((char*)s, sizeof(s)-1)
60 60
61 /** Expands a sstr_t to printf arguments. */
62 #define SFMT(s) (int) (s).length, (s).ptr
63
64 /** Format specifier for a sstr_t. */
65 #define PRIsstr ".*s"
66
61 #ifdef __cplusplus 67 #ifdef __cplusplus
62 extern "C" { 68 extern "C" {
63 #endif 69 #endif
64 70
65 /** 71 /**

mercurial