buf
buf — a string you can append to
|
|
Stability Level
Stable, unless otherwise indicated
Synopsis
#include <vips/vips.h>
VipsBuf;
#define VIPS_BUF_STATIC (TEXT)
void vips_buf_rewind (VipsBuf *buf
);
void vips_buf_destroy (VipsBuf *buf
);
void vips_buf_init (VipsBuf *buf
);
void vips_buf_set_static (VipsBuf *buf
,
char *base
,
int mx
);
void vips_buf_set_dynamic (VipsBuf *buf
,
int mx
);
void vips_buf_init_static (VipsBuf *buf
,
char *base
,
int mx
);
void vips_buf_init_dynamic (VipsBuf *buf
,
int mx
);
gboolean vips_buf_appendns (VipsBuf *buf
,
const char *str
,
int sz
);
gboolean vips_buf_appends (VipsBuf *buf
,
const char *str
);
gboolean vips_buf_appendf (VipsBuf *buf
,
const char *fmt
,
...
);
gboolean vips_buf_vappendf (VipsBuf *buf
,
const char *fmt
,
va_list ap
);
gboolean vips_buf_appendc (VipsBuf *buf
,
char ch
);
gboolean vips_buf_appendsc (VipsBuf *buf
,
gboolean quote
,
const char *str
);
gboolean vips_buf_appendgv (VipsBuf *buf
,
GValue *value
);
gboolean vips_buf_append_size (VipsBuf *buf
,
size_t n
);
gboolean vips_buf_removec (VipsBuf *buf
,
char ch
);
gboolean vips_buf_change (VipsBuf *buf
,
const char *o
,
const char *n
);
gboolean vips_buf_is_empty (VipsBuf *buf
);
gboolean vips_buf_is_full (VipsBuf *buf
);
const char * vips_buf_all (VipsBuf *buf
);
const char * vips_buf_firstline (VipsBuf *buf
);
gboolean vips_buf_appendg (VipsBuf *buf
,
double g
);
gboolean vips_buf_appendd (VipsBuf *buf
,
int d
);
int vips_buf_len (VipsBuf *buf
);
Description
A message buffer you can append stuff to safely and quickly. If the message
gets too long, you get "..." and truncation. Message buffers can be on the
stack or heap.
For example: