summaryrefslogtreecommitdiff
path: root/tools/source/inet
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-22 17:17:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 10:10:08 +0000
commit20153742d2dee2df022275a07cc958b1759b9b72 (patch)
treea91d3d42faa559783d407bb1fe08f4070d945762 /tools/source/inet
parenta22ce3e4483f6fe462eaba8826a91355957e3676 (diff)
add a stripStart, can replace EraseLeadingChars
Diffstat (limited to 'tools/source/inet')
-rw-r--r--tools/source/inet/inetstrm.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index 6fc8df2d2ed8..a11f22d4712c 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
+#include <comphelper/string.hxx>
#include <sal/types.h>
#include <rtl/memory.h>
#include <rtl/strbuf.hxx>
@@ -510,7 +511,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
aField.Copy (0, nPos));
ByteString aValue (
aField.Copy (nPos + 1, aField.Len() - nPos + 1));
- aValue.EraseLeadingChars (' ');
+ aValue = comphelper::string::stripStart(aValue, ' ');
pTargetMsg->SetHeaderField (
INetMessageHeader (aName, aValue));
@@ -1298,8 +1299,8 @@ INetMIMEMessageStream::GetMsgEncoding (const String& rContentType)
if (rContentType.GetTokenCount ('=') > 1)
{
String aCharset (rContentType.GetToken (1, '='));
- aCharset.EraseLeadingChars (' ');
- aCharset.EraseLeadingChars ('"');
+ aCharset = comphelper::string::stripStart(aCharset, ' ');
+ aCharset = comphelper::string::stripStart(aCharset, '"');
if (aCharset.CompareIgnoreCaseToAscii ("us-ascii", 8) == 0)
return INETMSG_ENCODING_7BIT;