summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-24 11:27:29 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-24 11:27:29 -0400
commit687b1d3f684e650efa704dac654345bd466620b8 (patch)
treef3884f7b2e979e959b3ef6c5f5187b9a853d53a0 /indra/llcommon/llstring.cpp
parent1a42b98a8f55662aed448e9bcd5035082140bbcf (diff)
parent01ffa6788793cdecff313b704422f0e814452489 (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'))