From a91bddda6db183e8cf6962bb4b31058e231dc62c Mon Sep 17 00:00:00 2001 From: amber Date: Sun, 5 Dec 2004 18:48:36 +0000 Subject: added value git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@470 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/utils.c | 7 +++++++ src/common/utils.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/common/utils.c b/src/common/utils.c index bdbce7318..84570190f 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -179,3 +179,10 @@ void StringBuf_Free(struct StringBuf *sbuf) StringBuf_Destroy(sbuf); free(sbuf)buf; } + +// Return the built string from the StringBuf [MouseJstr] +char * StringBuf_Value(struct StringBuf *sbuf) +{ + *sbuf->ptr_ = '\0'; + return sbuf->base_; +} diff --git a/src/common/utils.h b/src/common/utils.h index f6ea8e006..248bcd867 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -42,6 +42,7 @@ extern struct StringBuf * StringBuf_Malloc(); extern void StringBuf_Init(struct StringBuf *); extern int StringBuf_Printf(struct StringBuf *,const char *,...); extern int StringBuf_Append(struct StringBuf *,const struct StringBuf *); +extern char * StringBuf_Value(struct StringBuf *); extern void StringBuf_Destroy(struct StringBuf *); extern void StringBuf_Free(struct StringBuf *); -- cgit v1.2.3-70-g09d2