217 * @param ... additional arguments |
217 * @param ... additional arguments |
218 * @return a sstr_t containing the formatted string |
218 * @return a sstr_t containing the formatted string |
219 */ |
219 */ |
220 sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...); |
220 sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...); |
221 |
221 |
|
222 /** Shortcut for ucx_asprintf() with default allocator. */ |
|
223 #define ucx_sprintf(fmt, ...) \ |
|
224 ucx_asprintf(ucx_default_allocator(), fmt, __VA_ARGS___) |
|
225 |
222 /** |
226 /** |
223 * <code>va_list</code> version of ucx_asprintf(). |
227 * <code>va_list</code> version of ucx_asprintf(). |
224 * |
228 * |
225 * @param allocator the UcxAllocator used for allocating the result sstr_t |
229 * @param allocator the UcxAllocator used for allocating the result sstr_t |
226 * @param fmt format string |
230 * @param fmt format string |