* fix off by one in increase buffer function
void StrBufCutRight(StrBuf *Buf, int nChars);
void StrBufTrim(StrBuf *Buf);
void StrBufUpCase(StrBuf *Buf);
+void StrBufLowerCase(StrBuf *Buf);
void StrBufEUid_unescapize(StrBuf *target, const StrBuf *source);
void StrBufEUid_escapize(StrBuf *target, const StrBuf *source);
return -1;
if (DestSize > 0)
- while (NewSize < DestSize)
+ while (NewSize <= DestSize)
NewSize *= 2;
NewBuf= (char*) malloc(NewSize);
}
+void StrBufLowerCase(StrBuf *Buf)
+{
+ char *pch, *pche;
+
+ pch = Buf->buf;
+ pche = pch + Buf->BufUsed;
+ while (pch < pche) {
+ *pch = tolower(*pch);
+ pch ++;
+ }
+}
+
+
/**
* \brief unhide special chars hidden to the HTML escaper
* \param target buffer to put the unescaped string in