forked from GitHub/gf-core
add gu_string_buf_data and gu_string_buf_length in libgu
This commit is contained in:
@@ -82,6 +82,20 @@ gu_string_buf_freeze(GuStringBuf* sb, GuPool* pool)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char*
|
||||||
|
gu_string_buf_data(GuStringBuf* sb)
|
||||||
|
{
|
||||||
|
gu_out_flush(sb->out, NULL);
|
||||||
|
return gu_buf_data(sb->buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
gu_string_buf_length(GuStringBuf* sb)
|
||||||
|
{
|
||||||
|
gu_out_flush(sb->out, NULL);
|
||||||
|
return gu_buf_length(sb->buf);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gu_string_buf_flush(GuStringBuf* sb)
|
gu_string_buf_flush(GuStringBuf* sb)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ gu_string_buf_out(GuStringBuf* sb);
|
|||||||
GuString
|
GuString
|
||||||
gu_string_buf_freeze(GuStringBuf* sb, GuPool* pool);
|
gu_string_buf_freeze(GuStringBuf* sb, GuPool* pool);
|
||||||
|
|
||||||
|
char*
|
||||||
|
gu_string_buf_data(GuStringBuf* sb);
|
||||||
|
|
||||||
|
size_t
|
||||||
|
gu_string_buf_length(GuStringBuf* sb);
|
||||||
|
|
||||||
void
|
void
|
||||||
gu_string_buf_flush(GuStringBuf* sb);
|
gu_string_buf_flush(GuStringBuf* sb);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user