added value

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@470 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
amber 2004-12-05 18:48:36 +00:00
parent b0958859af
commit 0d2f0d0db7
2 changed files with 8 additions and 0 deletions

View File

@ -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_;
}

View File

@ -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 *);