Chromium Code Reviews

Unified Diff: base/strings/string_util.h

Issue 254983006: Fix: Adding list of supported codecs for MP4 containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding testcases for EME Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: base/strings/string_util.h
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index 473deaebe87d5bca7556418531856ada2c629c61..3b1c06a68faf7c2b6c1ede3d703d1af54ec6cc75 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -259,6 +259,8 @@ BASE_EXPORT bool IsStringUTF8(const std::string& str);
BASE_EXPORT bool IsStringASCII(const base::StringPiece& str);
BASE_EXPORT bool IsStringASCII(const base::string16& str);
+BASE_EXPORT bool IsUpperCaseHexNumber(const std::string& number);
+
// Converts the elements of the given string. This version uses a pointer to
// clearly differentiate it from the non-pointer variant.
template <class str> inline void StringToLowerASCII(str* s) {
@@ -352,6 +354,11 @@ inline bool IsHexDigit(Char c) {
}
template <typename Char>
+inline bool IsUpperCaseHexDigit(Char c) {
+ return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F');
+}
+
+template <typename Char>
inline Char HexDigitToInt(Char c) {
DCHECK(IsHexDigit(c));
if (c >= '0' && c <= '9')
« no previous file with comments | « no previous file | base/strings/string_util.cc » ('j') | chrome/browser/media/encrypted_media_istypesupported_browsertest.cc » ('J')

Powered by Google App Engine