summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-05-29 14:42:19 -0700
committersimon <none@none>2013-05-29 14:42:19 -0700
commit507ce0d84fc3e7717c7c9ae58dcdae7785936f65 (patch)
treea7dde82693b2297a27024a00624c1ec9f81c2d0c /indra/llcommon/llstring.cpp
parent473474b94969799d2835191072c5bca1b7d431d8 (diff)
parent3698aece0d2b396b55b46189e8ea7ee02da9483b (diff)
Merge downstream code
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'))