Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3255)

Unified Diff: base/strings/string_util.cc

Issue 89243003: Move EmptyString, kWhitespace and the BOM to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/strings/string_util.h ('k') | base/strings/string_util_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util.cc
diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc
index becc60f9ea5d756aa106065dee6659324030ff20..4fa3f3fe97f5ac5cb562f5e8293dff58f48cac2d 100644
--- a/base/strings/string_util.cc
+++ b/base/strings/string_util.cc
@@ -100,9 +100,6 @@ bool IsWprintfFormatPortable(const wchar_t* format) {
return true;
}
-} // namespace base
-
-
const std::string& EmptyString() {
return EmptyStrings::GetInstance()->s;
}
@@ -115,6 +112,8 @@ const string16& EmptyString16() {
return EmptyStrings::GetInstance()->s16;
}
+} // namespace base
+
template<typename STR>
bool ReplaceCharsT(const STR& input,
const typename STR::value_type replace_chars[],
@@ -241,16 +240,16 @@ void TruncateUTF8ToByteSize(const std::string& input,
output->clear();
}
-TrimPositions TrimWhitespace(const string16& input,
+TrimPositions TrimWhitespace(const base::string16& input,
TrimPositions positions,
- string16* output) {
- return TrimStringT(input, kWhitespaceUTF16, positions, output);
+ base::string16* output) {
+ return TrimStringT(input, base::kWhitespaceUTF16, positions, output);
}
TrimPositions TrimWhitespaceASCII(const std::string& input,
TrimPositions positions,
std::string* output) {
- return TrimStringT(input, kWhitespaceASCII, positions, output);
+ return TrimStringT(input, base::kWhitespaceASCII, positions, output);
}
// This function is only for backward-compatibility.
@@ -321,8 +320,8 @@ bool ContainsOnlyWhitespaceASCII(const std::string& str) {
return true;
}
-bool ContainsOnlyWhitespace(const string16& str) {
- return str.find_first_not_of(kWhitespaceUTF16) == string16::npos;
+bool ContainsOnlyWhitespace(const base::string16& str) {
+ return str.find_first_not_of(base::kWhitespaceUTF16) == string16::npos;
}
template<typename STR>
« no previous file with comments | « base/strings/string_util.h ('k') | base/strings/string_util_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698