From 5a01e370feda0e2fb393aad549799a1e40beafde Mon Sep 17 00:00:00 2001 From: David Seikel Date: Sun, 3 Apr 2011 01:23:16 +1000 Subject: Push some of the trivial changes from the accountList branch. Should not change anything, and there will be more to come. --- linden/doc/contributions.txt | 4 +++- linden/indra/llcommon/llstring.cpp | 12 ++++++++++++ linden/indra/llcommon/llstring.h | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 8aab5c8..a48730e 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -49,6 +49,7 @@ Aleric Inglewood SNOW-86 SNOW-103 SNOW-119 + SNOW-129 SNOW-196 SNOW-203 SNOW-240 @@ -201,6 +202,8 @@ Catherine Pfeffer Celierra Darling VWR-1274 VWR-6975 +Cypren Christenson + SNOW-129 Dale Glass VWR-120 VWR-560 @@ -474,7 +477,6 @@ Nicholaz Beresford Nicky Perian IMP-680 IMP-685 - IMP-741 Nounouch Hapmouche VWR-238 Patric Mills 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) return out; } +bool LLStringOps::isHexString(const std::string& str) +{ + const char* buf = str.c_str(); + int len = str.size(); + while (--len >= 0) + { + if (!isxdigit(buf[len])) return false; + } + + return true; +} + #if LL_WINDOWS // documentation moved to header. Phoenix 2007-11-27 namespace 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: static S32 collate(const char* a, const char* b) { return strcoll(a, b); } static S32 collate(const llwchar* a, const llwchar* b); + + static bool isHexString(const std::string& str); }; /** -- cgit v1.1