diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-06-18 17:19:53 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-06-18 17:19:53 -0400 |
commit | c62b6c46955a16af9ec16ff7e6bf9fb2c4b6e229 (patch) | |
tree | ed3214d428e960b9e840eccdba31255c0fdcaea6 /indra/llcommon/llstring.cpp | |
parent | f88594599c01edff981b6d070f84566fcb7d4ecf (diff) | |
parent | 69b062b90889fe581de0d10d60b979cb7883b4a0 (diff) |
merge
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rwxr-xr-x | indra/llcommon/llstring.cpp | 17 |
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')) |