/**
* @ingroup StrBuf_DeConstructors
* @brief Copy Constructor; CreateRelpaceMe will contain CopyFlushMe afterwards.
/**
* @ingroup StrBuf_DeConstructors
* @brief Copy Constructor; CreateRelpaceMe will contain CopyFlushMe afterwards.
* @param CopyFlushMe Buffer to faxmilate if KeepOriginal, or to move into CreateRelpaceMe if !KeepOriginal.
* @param CreateRelpaceMe If NULL, will be created, else Flushed and filled CopyFlushMe
* @param KeepOriginal should CopyFlushMe remain intact? or may we Steal its buffer?
* @returns the new stringbuffer
*/
* @param CopyFlushMe Buffer to faxmilate if KeepOriginal, or to move into CreateRelpaceMe if !KeepOriginal.
* @param CreateRelpaceMe If NULL, will be created, else Flushed and filled CopyFlushMe
* @param KeepOriginal should CopyFlushMe remain intact? or may we Steal its buffer?
* @returns the new stringbuffer
*/
-void NewStrBufDupAppendFlush(StrBuf **CreateRelpaceMe, StrBuf *CopyFlushMe, int KeepOriginal)
+void NewStrBufDupAppendFlush(StrBuf **CreateRelpaceMe, StrBuf *CopyFlushMe, const char *NoMe, int KeepOriginal)
+
+ if (NoMe != NULL)
+ {
+ if (*CreateRelpaceMe != NULL)
+ StrBufPlain(*CreateRelpaceMe, NoMe, KeepOriginal);
+ else
+ *CreateRelpaceMe = NewStrBufPlain(NoMe, KeepOriginal);
+ return;
+ }
+
+/**
+ * @ingroup StrBuf
+ * @brief changes all spaces in the string (tab, linefeed...) to Blank (0x20)
+ * @param Buf the string to modify
+ */
+void StrBufSpaceToBlank(StrBuf *Buf)
+{
+ char *pche, *pch;
+
+ if ((Buf == NULL) || (Buf->BufUsed == 0)) return;
+
+ pch = Buf->buf;
+ pche = pch + Buf->BufUsed;
+ while (pch < pche)
+ {
+ if (isspace(*pch))
+ *pch = ' ';
+ pch ++;
+ }
+}