summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-05 18:48:36 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-05 18:48:36 +0000
commita91bddda6db183e8cf6962bb4b31058e231dc62c (patch)
tree15ea86e4e880e700bf4fd22c3d2644a7e9101b79
parent8afab5b9bab2dfd45174d8aaa16c342aa526468e (diff)
downloadhercules-a91bddda6db183e8cf6962bb4b31058e231dc62c.tar.gz
hercules-a91bddda6db183e8cf6962bb4b31058e231dc62c.tar.bz2
hercules-a91bddda6db183e8cf6962bb4b31058e231dc62c.tar.xz
hercules-a91bddda6db183e8cf6962bb4b31058e231dc62c.zip
added value
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@470 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/common/utils.c7
-rw-r--r--src/common/utils.h1
2 files changed, 8 insertions, 0 deletions
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 *);