diff options
Diffstat (limited to 'indra/llcommon/llstring.h')
-rw-r--r-- | indra/llcommon/llstring.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 123f4184b5..db716b1431 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -46,7 +46,6 @@ #endif #include <string.h> -#include <boost/scoped_ptr.hpp> const char LL_UNKNOWN_CHAR = '?'; class LLSD; @@ -832,8 +831,10 @@ template<> LL_COMMON_API std::wstring windows_message<std::wstring>(unsigned long error); /// Get Windows message string, implicitly calling GetLastError() +LL_COMMON_API unsigned long windows_get_last_error(); + template<typename STRING> -STRING windows_message() { return windows_message<STRING>(GetLastError()); } +STRING windows_message() { return windows_message<STRING>(windows_get_last_error()); } //@} @@ -890,6 +891,20 @@ namespace LLStringFn /** + * @brief Replace all characters that are not allowed in XML 1.0 + * with corresponding literals: [ < > & ] => [ < > & ] + */ + LL_COMMON_API std::string xml_encode(const std::string& input, bool for_attribute = false); + + + /** + * @brief Replace some of XML literals that are defined in XML 1.0 + * with corresponding characters: [ < > & ] => [ < > & ] + */ + LL_COMMON_API std::string xml_decode(const std::string& input, bool for_attribute = false); + + + /** * @brief Replace all control characters (0 <= c < 0x20) with replacement in * string. This is safe for utf-8 * |