From e03bb0606a10f29c8b94909a713a5bb5c69e88b7 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Thu, 21 Jun 2007 22:40:22 +0000 Subject: merge -r62831:64079 branches/maintenance to release --- indra/llcommon/llstring.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra/llcommon/llstring.cpp') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index c6f436a5bb..0b799b94ae 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -653,6 +653,26 @@ std::string mbcsstring_makeASCII(const std::string& wstr) } return out_str; } +std::string utf8str_removeCRLF(const std::string& utf8str) +{ + if (0 == utf8str.length()) + { + return std::string(); + } + const char CR = 13; + + std::string out; + out.reserve(utf8str.length()); + const S32 len = (S32)utf8str.length(); + for( S32 i = 0; i < len; i++ ) + { + if( utf8str[i] != CR ) + { + out.push_back(utf8str[i]); + } + } + return out; +} #if LL_WINDOWS /* If the size of the passed in buffer is not large enough to hold the string, -- cgit v1.2.3