29#include <mstdlib/base/m_defs.h>
30#include <mstdlib/base/m_types.h>
31#include <mstdlib/base/m_str.h>
32#include <mstdlib/base/m_decimal.h>
33#include <mstdlib/base/m_endian.h>
121M_API
unsigned char *
M_buf_finish(
M_buf_t *buf,
size_t *out_length) M_FREE(1) M_WARN_UNUSED_RESULT M_MALLOC M_WARN_NONNULL(2);
367 const
char *newline);
789#define M_buf_add_uint_money(buf, amount, max_width) M_buf_add_int_money(buf, M_ABS(amount), max_width)
801#define M_buf_add_uint_money_dot(buf, amount, max_width) M_buf_add_int_money_dot(buf, M_ABS(amount), max_width)
813# define M_buf_add_uint_money_just(buf, amount, max_width) M_buf_add_int_money_just(buf, M_ABS(amount), max_width)
826#define M_buf_add_uint_money_dot_just(buf, amount, max_width) M_buf_add_int_money_dot_just(buf, M_ABS(amount), max_width)
882 const M_uint8 *search_bytes,
size_t search_len,
const M_uint8 *replace_bytes,
size_t replace_len);
896 const char *search_str,
const char *replace_str);
917M_API
void M_buf_add_str_quoted(
M_buf_t *buf,
char quote_char,
char escape_char,
const char *quote_req_chars, M_bool always_quote,
const char *src);
M_bincodec_codec_t
Definition: m_bincodec.h:67
void M_buf_add_str_just(M_buf_t *buf, const char *str, M_str_justify_type_t justify_type, unsigned char fill_char, size_t width)
M_bool M_buf_add_encode(M_buf_t *buf, const void *bytes, size_t bytes_len, size_t wrap, M_bincodec_codec_t codec)
M_bool M_buf_add_str_replace(M_buf_t *dest_buf, const char *src_str, const char *search_str, const char *replace_str)
void M_buf_add_byte(M_buf_t *buf, unsigned char byte)
void M_buf_add_char(M_buf_t *buf, char c)
M_bool M_buf_add_bytes_replace(M_buf_t *dest_buf, const M_uint8 *src, size_t src_len, const M_uint8 *search_bytes, size_t search_len, const M_uint8 *replace_bytes, size_t replace_len)
M_bool M_buf_add_int_money_dot(M_buf_t *buf, M_int64 amount, size_t max_width) M_WARN_UNUSED_RESULT
M_bool M_buf_add_money_dot(M_buf_t *buf, const char *amount, size_t max_width) M_WARN_UNUSED_RESULT
size_t M_buf_alloc_size(const M_buf_t *buf)
M_bool M_buf_add_uintbcd(M_buf_t *buf, M_uint64 n, size_t width)
M_bool M_buf_add_decimal(M_buf_t *buf, const M_decimal_t *decimal, M_bool implied_decimal, M_int8 num_decimals, size_t max_width) M_WARN_UNUSED_RESULT
void M_buf_add_bytes(M_buf_t *buf, const void *bytes, size_t bytes_length)
M_bool M_buf_decode(M_buf_t *buf, M_bincodec_codec_t codec)
M_bool M_buf_add_uintstrbin(M_buf_t *buf, const char *s, unsigned char base, size_t width, M_endian_t endianness)
unsigned char * M_buf_finish(M_buf_t *buf, size_t *out_length) M_FREE(1) M_WARN_UNUSED_RESULT M_MALLOC
void M_buf_truncate(M_buf_t *buf, size_t length)
void M_buf_add_bytes_just(M_buf_t *buf, const void *bytes, size_t bytes_length, M_str_justify_type_t justify_type, unsigned char fill_char, size_t width)
M_bool M_buf_add_bytes_hex(M_buf_t *buf, const char *hex_bytes)
void M_buf_bjoin_buf(M_buf_t *dest, unsigned char sep, M_buf_t **bufs, size_t cnt)
M_bool M_buf_add_decimal_just(M_buf_t *buf, const M_decimal_t *decimal, M_bool implied_decimal, M_int8 num_decimals, size_t max_width) M_WARN_UNUSED_RESULT
void M_buf_drop(M_buf_t *buf, size_t num)
unsigned char * M_buf_direct_write_start(M_buf_t *buf, size_t *len)
M_bool M_buf_add_uint_just(M_buf_t *buf, M_uint64 n, size_t width)
M_bool M_buf_add_decode(M_buf_t *buf, const char *encoded, size_t encoded_len, M_bincodec_codec_t codec)
void M_buf_add_int(M_buf_t *buf, M_int64 n)
void M_buf_add_fill(M_buf_t *buf, unsigned char fill_char, size_t width)
struct M_buf M_buf_t
Definition: m_buf.h:77
void M_buf_add_ptr(M_buf_t *buf, void *ptr)
void M_buf_add_uint(M_buf_t *buf, M_uint64 n)
void M_buf_add_bytehex(M_buf_t *buf, unsigned char byte, M_bool is_upper)
void M_buf_add_str_transform(M_buf_t *buf, M_uint32 transform_type, const char *str)
void M_buf_direct_write_end(M_buf_t *buf, size_t len)
const char * M_buf_peek(const M_buf_t *buf)
M_bool M_buf_add_int_money(M_buf_t *buf, M_int64 amount, size_t max_width) M_WARN_UNUSED_RESULT
M_BUF_TRANSFORM_TYPE
Definition: m_buf.h:80
void M_buf_add_str_hex(M_buf_t *buf, const void *bytes, size_t len)
void M_buf_add_str_upper(M_buf_t *buf, const char *str)
M_bool M_buf_add_int_money_dot_just(M_buf_t *buf, M_int64 amount, size_t max_width) M_WARN_UNUSED_RESULT
void M_buf_add_str_quoted(M_buf_t *buf, char quote_char, char escape_char, const char *quote_req_chars, M_bool always_quote, const char *src)
M_bool M_buf_add_uinthex(M_buf_t *buf, M_uint64 n, M_bool is_upper, size_t width)
size_t M_buf_len(const M_buf_t *buf)
M_bool M_buf_add_money_dot_just(M_buf_t *buf, const char *amount, size_t max_width) M_WARN_UNUSED_RESULT
M_bool M_buf_add_uintbin(M_buf_t *buf, M_uint64 n, size_t width, M_endian_t endianness)
M_buf_t * M_buf_create(void) M_WARN_UNUSED_RESULT M_MALLOC
void M_buf_sjoin_str(M_buf_t *dest, const char *sep, const char **strs, size_t cnt)
void M_buf_add_str_lower(M_buf_t *buf, const char *str)
size_t M_buf_add_str_lines(M_buf_t *buf, const char *str, size_t max_lines, size_t max_chars, M_bool truncate, const char *newline)
void M_buf_merge(M_buf_t *dest, M_buf_t *source) M_FREE(2)
M_bool M_buf_add_money(M_buf_t *buf, const char *amount, size_t max_width) M_WARN_UNUSED_RESULT
void M_buf_sjoin_buf(M_buf_t *dest, const char *sep, M_buf_t **bufs, size_t cnt)
M_bool M_buf_add_int_just(M_buf_t *buf, M_int64 n, size_t width)
char * M_buf_finish_str(M_buf_t *buf, size_t *out_length) M_FREE(1) M_WARN_UNUSED_RESULT M_MALLOC
void M_buf_add_str(M_buf_t *buf, const char *str)
void M_buf_bjoin_str(M_buf_t *dest, unsigned char sep, const char **strs, size_t cnt)
void M_buf_cancel(M_buf_t *buf) M_FREE(1)
void M_buf_add_str_just_transform(M_buf_t *buf, M_uint32 transform_type, const char *str, M_str_justify_type_t justify_type, unsigned char fill_char, size_t width)
void M_buf_trim(M_buf_t *buf)
M_bool M_buf_add_uintstrbcd(M_buf_t *buf, const char *s, unsigned char base, size_t width)
void M_buf_add_str_max(M_buf_t *buf, const char *str, size_t max)
M_bool M_buf_add_money_just(M_buf_t *buf, const char *amount, size_t max_width) M_WARN_UNUSED_RESULT
M_bool M_buf_encode(M_buf_t *buf, size_t wrap, M_bincodec_codec_t codec)
void M_buf_add_str_max_transform(M_buf_t *buf, M_uint32 transform_type, const char *str, size_t max)
M_bool M_buf_add_int_money_just(M_buf_t *buf, M_int64 amount, size_t max_width) M_WARN_UNUSED_RESULT
@ M_BUF_TRANSFORM_LTRIM
Definition: m_buf.h:84
@ M_BUF_TRANSFORM_TRIM
Definition: m_buf.h:86
@ M_BUF_TRANSFORM_UPPER
Definition: m_buf.h:82
@ M_BUF_TRANSFORM_RTRIM
Definition: m_buf.h:85
@ M_BUF_TRANSFORM_LOWER
Definition: m_buf.h:83
@ M_BUF_TRANSFORM_NONE
Definition: m_buf.h:81
Definition: m_decimal.h:78
M_endian_t
Definition: m_endian.h:76
M_str_justify_type_t
Definition: m_str.h:714