aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:59 -0500
committerJacek Antonelli2008-08-15 23:44:59 -0500
commita408bac29378072fbf36864164149458c978cfcc (patch)
tree67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/llcommon/llstring.cpp
parentSecond Life viewer sources 1.17.0.12 (diff)
downloadmeta-impy-a408bac29378072fbf36864164149458c978cfcc.zip
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz
Second Life viewer sources 1.17.1.0
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,