aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llcommon/llstring.cpp12
-rw-r--r--linden/indra/llcommon/llstring.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp
index 1f653c1..32a75c0 100644
--- a/linden/indra/llcommon/llstring.cpp
+++ b/linden/indra/llcommon/llstring.cpp
@@ -595,6 +595,18 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
595 return out; 595 return out;
596} 596}
597 597
598bool LLStringOps::isHexString(const std::string& str)
599{
600 const char* buf = str.c_str();
601 int len = str.size();
602 while (--len >= 0)
603 {
604 if (!isxdigit(buf[len])) return false;
605 }
606
607 return true;
608}
609
598#if LL_WINDOWS 610#if LL_WINDOWS
599// documentation moved to header. Phoenix 2007-11-27 611// documentation moved to header. Phoenix 2007-11-27
600namespace snprintf_hack 612namespace snprintf_hack
diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h
index 61767ac..1717479 100644
--- a/linden/indra/llcommon/llstring.h
+++ b/linden/indra/llcommon/llstring.h
@@ -175,6 +175,8 @@ public:
175 175
176 static S32 collate(const char* a, const char* b) { return strcoll(a, b); } 176 static S32 collate(const char* a, const char* b) { return strcoll(a, b); }
177 static S32 collate(const llwchar* a, const llwchar* b); 177 static S32 collate(const llwchar* a, const llwchar* b);
178
179 static bool isHexString(const std::string& str);
178}; 180};
179 181
180/** 182/**