aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llstring.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp
index 0f72d5e..cd5a9f2 100644
--- a/linden/indra/llcommon/llstring.cpp
+++ b/linden/indra/llcommon/llstring.cpp
@@ -596,6 +596,40 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
596 return out; 596 return out;
597} 597}
598 598
599bool is_hex_string(U8* str, S32 len)
600{
601 bool rv = true;
602 U8* c = str;
603 while(rv && len--)
604 {
605 switch(*c)
606 {
607 case '0':
608 case '1':
609 case '2':
610 case '3':
611 case '4':
612 case '5':
613 case '6':
614 case '7':
615 case '8':
616 case '9':
617 case 'a':
618 case 'b':
619 case 'c':
620 case 'd':
621 case 'e':
622 case 'f':
623 ++c;
624 break;
625 default:
626 rv = false;
627 break;
628 }
629 }
630 return rv;
631}
632
599#if LL_WINDOWS 633#if LL_WINDOWS
600// documentation moved to header. Phoenix 2007-11-27 634// documentation moved to header. Phoenix 2007-11-27
601namespace snprintf_hack 635namespace snprintf_hack