Functions | |
const cxchar * | cx_program_get_name (void) |
Get the name of the application. | |
void | cx_program_set_name (const cxchar *name) |
Set the name of the application. | |
cxint | cx_bits_find (cxuint32 mask, cxint start) |
Get the position of the first bit set, searching from left to right. | |
cxint | cx_bits_rfind (cxuint32 mask, cxint start) |
Get the position of the first bit set, searching from right to left. | |
cxint | cx_snprintf (cxchar *string, cxsize n, const cxchar *format,...) |
Safe version of sprintf(). | |
cxint | cx_vsnprintf (cxchar *string, cxsize n, const cxchar *format, va_list args) |
Safe version of vsprintf(). | |
cxint | cx_asprintf (cxchar **string, const cxchar *format,...) |
Write formatted output to a newly allocated string. | |
cxint | cx_vasprintf (cxchar **string, const cxchar *format, va_list args) |
Write formatted output to a newly allocated string with a variable-length argument list. | |
cxlong | cx_line_max (void) |
Get the maximum length of a line supported by the system. | |
cxchar * | cx_line_alloc (void) |
Allocate a line buffer with the maximum size supported by the system. |
#include <cxutils.h>
|
Write formatted output to a newly allocated string.
The pointer to the allocated string buffer sufficiently large to hold the string is returned to the caller in the string argument. This pointer should be passed to cx_free to release the allocated storage when it is no longer needed. If sufficient memory cannot be allocated is set to
|
|
Get the position of the first bit set, searching from left to right.
|
|
Get the position of the first bit set, searching from right to left.
|
|
Allocate a line buffer with the maximum size supported by the system.
|
|
Get the maximum length of a line supported by the system.
|
|
Get the name of the application.
|
|
Set the name of the application.
|
|
Safe version of sprintf().
The difference compared to sprintf() is that the produced number of characters does not exceed n (including the trailing null).
|
|
Write formatted output to a newly allocated string with a variable-length argument list.
The pointer to the allocated string buffer sufficiently large to hold the string is returned to the caller in the string argument. This pointer should be passed to cx_free to release the allocated storage when it is no longer needed. If sufficient memory cannot be allocated is set to
|
|
Safe version of vsprintf().
The difference compared to vsprintf() is that the produced number of characters does not exceed n (including the trailing null).
|