From 892f3cdd2c4d1b6aa9ec86547022d9f8194d6b80 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 22 May 2013 06:26:54 -0400 Subject: CHUI-967: fix display of % escapes in chat --- indra/llcommon/llstring.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/llcommon/llstring.cpp') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 0c32679744..22c8681983 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -52,6 +52,23 @@ std::string ll_safe_string(const char* in, S32 maxlen) return std::string(); } +bool is_char_hex(char hex) +{ + if((hex >= '0') && (hex <= '9')) + { + return true; + } + else if((hex >= 'a') && (hex <='f')) + { + return true; + } + else if((hex >= 'A') && (hex <='F')) + { + return true; + } + return false; // uh - oh, not hex any more... +} + U8 hex_as_nybble(char hex) { if((hex >= '0') && (hex <= '9')) -- cgit v1.2.3