diff options
author | David Walter Seikel | 2013-09-01 03:20:28 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-09-01 03:20:28 +1000 |
commit | 2eb0e429d8c8dcc095aff7e703a9a3249c345628 (patch) | |
tree | 405c34a2f594c5d940b290579166b9e95349e418 /linden/indra/llcommon | |
parent | Merge remote-tracking branch 'imprudence/next' into next (diff) | |
download | meta-impy-2eb0e429d8c8dcc095aff7e703a9a3249c345628.zip meta-impy-2eb0e429d8c8dcc095aff7e703a9a3249c345628.tar.gz meta-impy-2eb0e429d8c8dcc095aff7e703a9a3249c345628.tar.bz2 meta-impy-2eb0e429d8c8dcc095aff7e703a9a3249c345628.tar.xz |
Merge post fixes so that Linux compiles.
Windows is being a pig, will take a while.
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r-- | linden/indra/llcommon/llstring.cpp | 34 | ||||
-rw-r--r-- | linden/indra/llcommon/llstring.h | 2 |
2 files changed, 36 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp index 95aa7b5..fe0ab2a 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 | ||
599 | bool 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 | bool LLStringOps::isHexString(const std::string& str) | 633 | bool LLStringOps::isHexString(const std::string& str) |
600 | { | 634 | { |
601 | const char* buf = str.c_str(); | 635 | const char* buf = str.c_str(); |
diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index ced9713..e1b5cbd 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h | |||
@@ -458,6 +458,8 @@ LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str); | |||
458 | 458 | ||
459 | LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str); | 459 | LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str); |
460 | 460 | ||
461 | LL_COMMON_API bool is_hex_string(U8* str, S32 len); | ||
462 | |||
461 | 463 | ||
462 | #if LL_WINDOWS | 464 | #if LL_WINDOWS |
463 | /* @name Windows string helpers | 465 | /* @name Windows string helpers |