summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authormberezhnoy <mberezhnoy@productengine.com>2013-06-07 19:34:34 +0300
committermberezhnoy <mberezhnoy@productengine.com>2013-06-07 19:34:34 +0300
commit15b6a395d00d55c50e98c86498669bd06782cb15 (patch)
tree0a64d37e2b21c5e084d7855be7128c28f458ac89 /indra/llcommon/llstring.cpp
parent57b21335ba232d4023ec2cda81153d02bc190f6b (diff)
parent0bcb1db3ea8056e96b6cb087758e6ee57bc122a3 (diff)
merge
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'))