summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-05-22 06:27:51 -0400
committerOz Linden <oz@lindenlab.com>2013-05-22 06:27:51 -0400
commit7fad053982d835ff5b9ec496bc94ddbedc234dcc (patch)
tree273e8a4ed1fc258675af0dc68c5bed7a3d43b92e /indra/llcommon/llstring.cpp
parent4f08780b00bd6c4f40b88dc46ed9363dbcbf7836 (diff)
parent892f3cdd2c4d1b6aa9ec86547022d9f8194d6b80 (diff)
merge changes for chui-967
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rwxr-xr-xindra/llcommon/llstring.cpp17
1 files changed, 17 insertions, 0 deletions
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'))