24G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
29 const
char *separator, const
char *first, ...)
30G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
48 const
char *separator,
char **str_array)
65 const
char *delimiter,
int max_tokens);
194const uint8_t *
ws_memrchr(const
void *haystack,
int ch,
size_t n);
197char *ws_escape_string(
wmem_allocator_t *alloc, const
char *
string,
bool add_quotes);
200char *ws_escape_string_len(
wmem_allocator_t *alloc, const
char *
string, ssize_t len,
bool add_quotes);
204char *ws_escape_null(
wmem_allocator_t *alloc, const
char *
string,
size_t len,
bool add_quotes);
226char *ws_escape_csv(
wmem_allocator_t *alloc, const
char *
string,
bool add_quotes,
char quote_char,
bool double_quote,
bool escape_whitespace);
253#define FORMAT_SIZE_PREFIX_SI (1 << 0)
254#define FORMAT_SIZE_PREFIX_IEC (1 << 1)
288#define format_size(size, unit, flags) \
289 format_size_wmem(NULL, size, unit, flags)
292char printable_char_or_period(
char c);
294WS_DLL_PUBLIC WS_RETNONNULL
295const char *ws_strerrorname_r(
int errnum,
char *buf,
size_t buf_size);
298char *ws_strdup_underline(
wmem_allocator_t *allocator,
long offset,
size_t len);
373 const char *
string,
size_t len,
char chr);
417void EBCDIC_to_ASCII(uint8_t *buf,
unsigned bytes);
420uint8_t EBCDIC_to_ASCII1(uint8_t c);
424 HEXDUMP_ENC_ASCII = 0,
425 HEXDUMP_ENC_EBCDIC = 1
432#define HEXDUMP_ASCII_MASK (0x0003U)
433#define HEXDUMP_ASCII_OPTION(option) ((option) & HEXDUMP_ASCII_MASK)
435#define HEXDUMP_ASCII_INCLUDE (0x0000U)
436#define HEXDUMP_ASCII_DELIMIT (0x0001U)
437#define HEXDUMP_ASCII_EXCLUDE (0x0002U)
440bool hex_dump_buffer(
bool (*print_line)(
void *,
const char *),
void *fp,
441 const unsigned char *cp,
unsigned length,
442 hex_dump_enc encoding,
443 unsigned ascii_option);
446#define plurality(d,s,p) ((d) == 1 ? (s) : (p))
448#define true_or_false(val) ((val) ? "TRUE" : "FALSE")
450#define string_or_null(val) ((val) ? (val) : "[NULL]")
WS_DLL_PUBLIC const uint8_t * ws_memrchr(const void *haystack, int ch, size_t n)
Definition str_util.c:347
WS_DLL_PUBLIC char * format_text_string(wmem_allocator_t *allocator, const char *string)
Definition str_util.c:1246
WS_DLL_PUBLIC bool isprint_string(const char *str)
Definition str_util.c:267
WS_DLL_PUBLIC char * ws_utf8_truncate(char *string, size_t len)
Definition str_util.c:1323
WS_DLL_PUBLIC bool isprint_utf8_string(const char *str, const unsigned length)
Definition str_util.c:285
WS_DLL_PUBLIC char * ascii_strup_inplace(char *str)
Definition str_util.c:254
format_size_units_e
Definition str_util.h:231
@ FORMAT_SIZE_UNIT_BITS_S
Definition str_util.h:241
@ FORMAT_SIZE_UNIT_EVENTS
Definition str_util.h:245
@ FORMAT_SIZE_UNIT_BYTES
Definition str_util.h:239
@ FORMAT_SIZE_UNIT_PACKETS
Definition str_util.h:243
@ FORMAT_SIZE_UNIT_BYTES_S
Definition str_util.h:242
@ FORMAT_SIZE_UNIT_SECONDS
Definition str_util.h:249
@ FORMAT_SIZE_UNIT_NONE
Definition str_util.h:232
@ FORMAT_SIZE_UNIT_FIELDS
Definition str_util.h:247
@ FORMAT_SIZE_UNIT_EVENTS_S
Definition str_util.h:246
@ FORMAT_SIZE_UNIT_ERLANGS
Definition str_util.h:250
@ FORMAT_SIZE_UNIT_PACKETS_S
Definition str_util.h:244
@ FORMAT_SIZE_UNIT_BITS
Definition str_util.h:240
WS_DLL_PUBLIC char * ascii_strdown_inplace(char *str)
Definition str_util.c:241
WS_DLL_PUBLIC char * format_text_chr(wmem_allocator_t *allocator, const char *string, size_t len, char chr)
Definition str_util.c:1275
WS_DLL_PUBLIC char * format_text_wsp(wmem_allocator_t *allocator, const char *line, size_t len)
Definition str_util.c:1258
WS_DLL_PUBLIC const char * ws_ascii_strcasestr(const char *haystack, const char *needle)
Definition str_util.c:327
WS_DLL_PUBLIC char ** wmem_strsplit(wmem_allocator_t *allocator, const char *src, const char *delimiter, int max_tokens)
Definition str_util.c:141
WS_DLL_PUBLIC char * format_text(wmem_allocator_t *allocator, const char *string, size_t len)
Definition str_util.c:1221
WS_DLL_PUBLIC char * format_char(wmem_allocator_t *allocator, char c)
Definition str_util.c:1295
WS_DLL_PUBLIC char * format_size_wmem(wmem_allocator_t *allocator, int64_t size, format_size_units_e unit, uint16_t flags)
Definition str_util.c:595
WS_DLL_PUBLIC char * wmem_strjoinv(wmem_allocator_t *allocator, const char *separator, char **str_array) G_GNUC_MALLOC
Definition str_util.c:99
WS_DLL_PUBLIC char * wmem_ascii_strdown(wmem_allocator_t *allocator, const char *str, ssize_t len)
Definition str_util.c:199
WS_DLL_PUBLIC bool isdigit_string(const unsigned char *str)
Definition str_util.c:310
Definition wmem_allocator.h:27