aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcommon/llstring.cpp')
-rw-r--r--linden/indra/llcommon/llstring.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp
index 22d7b47..b5e307f 100644
--- a/linden/indra/llcommon/llstring.cpp
+++ b/linden/indra/llcommon/llstring.cpp
@@ -673,6 +673,26 @@ std::string mbcsstring_makeASCII(const std::string& wstr)
673 } 673 }
674 return out_str; 674 return out_str;
675} 675}
676std::string utf8str_removeCRLF(const std::string& utf8str)
677{
678 if (0 == utf8str.length())
679 {
680 return std::string();
681 }
682 const char CR = 13;
683
684 std::string out;
685 out.reserve(utf8str.length());
686 const S32 len = (S32)utf8str.length();
687 for( S32 i = 0; i < len; i++ )
688 {
689 if( utf8str[i] != CR )
690 {
691 out.push_back(utf8str[i]);
692 }
693 }
694 return out;
695}
676 696
677#if LL_WINDOWS 697#if LL_WINDOWS
678/* If the size of the passed in buffer is not large enough to hold the string, 698/* If the size of the passed in buffer is not large enough to hold the string,