From 20a1794c160100e1f39f6e01f97d33378c0fa59f Mon Sep 17 00:00:00 2001 From: prozacx Date: Sun, 21 Feb 2010 01:35:54 +0000 Subject: [PATCH] Split the Token() change to an overloaded function git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1780 726aef4b-f618-498e-8847-2d620e286838 --- ZNCString.cpp | 4 ++++ ZNCString.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ZNCString.cpp b/ZNCString.cpp index cad3a284..ab952458 100644 --- a/ZNCString.cpp +++ b/ZNCString.cpp @@ -407,6 +407,10 @@ CString CString::Token(unsigned int uPos, bool bRest, const CString& sSep, bool return sRet; } + return Token(uPos, bRest, sSep, bAllowEmpty); +} + +CString CString::Token(unsigned int uPos, bool bRest, const CString& sSep, bool bAllowEmpty) const { const char *sep_str = sSep.c_str(); size_t sep_len = sSep.length(); const char *str = c_str(); diff --git a/ZNCString.h b/ZNCString.h index 44d28381..fda3d2ec 100644 --- a/ZNCString.h +++ b/ZNCString.h @@ -114,7 +114,8 @@ public: CString Right(unsigned int uCount) const; CString FirstLine() const { return Token(0, false, "\n"); } - CString Token(unsigned int uPos, bool bRest = false, const CString& sSep = " ", bool bAllowEmpty = false, const CString& sLeft = "", const CString& sRight = "", bool bTrimQuotes = true) const; + CString Token(unsigned int uPos, bool bRest = false, const CString& sSep = " ", bool bAllowEmpty = false) const; + CString Token(unsigned int uPos, bool bRest, const CString& sSep, bool bAllowEmpty, const CString& sLeft, const CString& sRight, bool bTrimQuotes = true) const; unsigned int URLSplit(MCString& msRet) const; unsigned int OptionSplit(MCString& msRet, bool bUpperKeys = false) const;