Index: base/string_util.cc |
diff --git a/base/string_util.cc b/base/string_util.cc |
index 125c713be67ce0194c767e830f3a5cd863a42b05..d7b67299073d5ff67913b02400f0f9eb62528350 100644 |
--- a/base/string_util.cc |
+++ b/base/string_util.cc |
@@ -822,63 +822,6 @@ string16 JoinString(const std::vector<string16>& parts, char16 sep) { |
return JoinStringT(parts, sep); |
} |
-template<typename STR> |
-void SplitStringAlongWhitespaceT(const STR& str, std::vector<STR>* result) { |
- const size_t length = str.length(); |
- if (!length) |
- return; |
- |
- bool last_was_ws = false; |
- size_t last_non_ws_start = 0; |
- for (size_t i = 0; i < length; ++i) { |
- switch (str[i]) { |
- // HTML 5 defines whitespace as: space, tab, LF, line tab, FF, or CR. |
- case L' ': |
- case L'\t': |
- case L'\xA': |
- case L'\xB': |
- case L'\xC': |
- case L'\xD': |
- if (!last_was_ws) { |
- if (i > 0) { |
- result->push_back( |
- str.substr(last_non_ws_start, i - last_non_ws_start)); |
- } |
- last_was_ws = true; |
- } |
- break; |
- |
- default: // Not a space character. |
- if (last_was_ws) { |
- last_was_ws = false; |
- last_non_ws_start = i; |
- } |
- break; |
- } |
- } |
- if (!last_was_ws) { |
- result->push_back( |
- str.substr(last_non_ws_start, length - last_non_ws_start)); |
- } |
-} |
- |
-void SplitStringAlongWhitespace(const std::wstring& str, |
- std::vector<std::wstring>* result) { |
- SplitStringAlongWhitespaceT(str, result); |
-} |
- |
-#if !defined(WCHAR_T_IS_UTF16) |
-void SplitStringAlongWhitespace(const string16& str, |
- std::vector<string16>* result) { |
- SplitStringAlongWhitespaceT(str, result); |
-} |
-#endif |
- |
-void SplitStringAlongWhitespace(const std::string& str, |
- std::vector<std::string>* result) { |
- SplitStringAlongWhitespaceT(str, result); |
-} |
- |
template<class FormatStringType, class OutStringType> |
OutStringType DoReplaceStringPlaceholders(const FormatStringType& format_string, |
const std::vector<OutStringType>& subst, std::vector<size_t>* offsets) { |