summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-05-30 14:54:15 -0700
committerMerov Linden <merov@lindenlab.com>2013-05-30 14:54:15 -0700
commit1f84fe88c66558411382e515f6abe8b677f9b98d (patch)
treeebefe3e8615adebf46463b761538c2f7636a2216 /indra/llcommon/llstring.cpp
parente72a9ebf638db2197920115be57493a40d54d2b6 (diff)
parentdcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff)
Pull merge from viewer-release
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'))