53 va_start(argptr, format);
63 va_copy(argptr2, argptr);
66 int len = vsprintf(junkBuf, format, argptr)+1;
68 int len = vsnprintf(0, 0, format, argptr)+1;
71 end = vsprintf(
buf, format, argptr2) +
buf;
84 va_start(argptr, format);
87 int len = vsprintf(junkBuf, format, argptr)+1;
89 int len = vsnprintf(0, 0, format, argptr)+1;
93 va_start(argptr, format);
94 end += vsprintf(
end, format, argptr);
104 int len = (int)((max > -1) ? max : strlen(str));
106 if (!len || (pos >
length()))
118 memcpy(
buf+pos, str, len);
#define SWORD_NAMESPACE_START
SWBuf & appendFormatted(const char *format,...)
unsigned long length() const
SWBuf & setFormattedVA(const char *format, va_list argptr)
void assureMore(size_t pastEnd)
SWORD_NAMESPACE_START char * stdstr(char **ipstr, const char *istr, unsigned int memPadFactor=1)
void insert(unsigned long pos, const char *str, unsigned long start=0, signed long max=-1)
const char * c_str() const
SWBuf & append(const char *str, long max=-1)
void assureSize(size_t checkSize)
char * tolowerstr(char *t, unsigned int max=0)
unsigned long size() const
char * toupperstr(char *t, unsigned int max=0)
#define SWORD_NAMESPACE_END
SWBuf & setFormatted(const char *format,...)