diff options
author | Robert Knop <prospero@lindenlab.com> | 2009-01-19 20:40:59 +0000 |
---|---|---|
committer | Robert Knop <prospero@lindenlab.com> | 2009-01-19 20:40:59 +0000 |
commit | f1380f2fc3eecd8dfd2f75d053ff86716d5055f7 (patch) | |
tree | 842470a9ff4341d09e1f7f9210aae0f6499fb4b1 /indra/llcommon/llstring.h | |
parent | 15a6d273cc00e1f4f9f9d56d8c878b46b283b289 (diff) |
Merging from the server/server-1.25 branch
svn merge -r107352:108210
svn+ssh://svn.lindenlab.com/svn/linden/branches/server/server-1.25
Merge conflicts were resolved:
scripts/start-server : one conflict, kept the "working" version
indra/llcommon/llversionserver.h : reverted
indra/newview/Info-SecondLife.plist : reverted
indra/newview/res/viewerRes.rc : reverted
indra/newsim/llagentinfo.cpp : kept *both*... "working" had
is_agent_online, which nothing else had, and the merge had
isGodAllowed(), part of SEC resolution
indra/backbone/agent_router.py : kartic & rdw merged and reviewed
using brains and things
indra/newsim/llsimhttpresponder.cpp : doesn't exist in trunk, and
that's OK (even though there was a change for it)
Diffstat (limited to 'indra/llcommon/llstring.h')
-rw-r--r-- | indra/llcommon/llstring.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 4b62fbe70e..8f6626b501 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -487,48 +487,29 @@ namespace LLStringFn /** * @brief Replace all non-printable characters with replacement in * string. + * NOTE - this will zap non-ascii * * @param [in,out] string the to modify. out value is the string * with zero non-printable characters. * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. */ - void replace_nonprintable( + void replace_nonprintable_in_ascii( std::basic_string<char>& string, char replacement); - /** - * @brief Replace all non-printable characters with replacement in - * a wide string. - * - * @param [in,out] string the to modify. out value is the string - * with zero non-printable characters. - * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. - */ - void replace_nonprintable( - std::basic_string<llwchar>& string, - llwchar replacement); /** * @brief Replace all non-printable characters and pipe characters * with replacement in a string. + * NOTE - this will zap non-ascii * * @param [in,out] the string to modify. out value is the string * with zero non-printable characters and zero pipe characters. * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. */ - void replace_nonprintable_and_pipe(std::basic_string<char>& str, + void replace_nonprintable_and_pipe_in_ascii(std::basic_string<char>& str, char replacement); - /** - * @brief Replace all non-printable characters and pipe characters - * with replacement in a wide string. - * - * @param [in,out] the string to modify. out value is the string - * with zero non-printable characters and zero pipe characters. - * @param The replacement wide character. use LL_UNKNOWN_CHAR if unsure. - */ - void replace_nonprintable_and_pipe(std::basic_string<llwchar>& str, - llwchar replacement); /** * @brief Remove all characters that are not allowed in XML 1.0. @@ -536,6 +517,19 @@ namespace LLStringFn * Works with US ASCII and UTF-8 encoded strings. JC */ std::string strip_invalid_xml(const std::string& input); + + + /** + * @brief Replace all control characters (0 <= c < 0x20) with replacement in + * string. This is safe for utf-8 + * + * @param [in,out] string the to modify. out value is the string + * with zero non-printable characters. + * @param The replacement character. use LL_UNKNOWN_CHAR if unsure. + */ + void replace_ascii_controlchars( + std::basic_string<char>& string, + char replacement); } //////////////////////////////////////////////////////////// |