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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/util/string_split.cc

Issue 208243005: Determine language code and type of format for address. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ctime include. Created 6 years, 9 months 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
Index: third_party/libaddressinput/chromium/cpp/src/util/string_split.cc
diff --git a/third_party/libaddressinput/chromium/cpp/src/util/string_split.cc b/third_party/libaddressinput/chromium/cpp/src/util/string_split.cc
deleted file mode 100644
index 7c8b035a3d09f84e12a1058f4133a3494656a760..0000000000000000000000000000000000000000
--- a/third_party/libaddressinput/chromium/cpp/src/util/string_split.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// The original source code is from:
-// http://src.chromium.org/viewvc/chrome/trunk/src/base/strings/string_split.cc?revision=216633
-
-#include "string_split.h"
-
-#include <cassert>
-#include <cstddef>
-#include <string>
-#include <vector>
-
-namespace i18n {
-namespace addressinput {
-
-void SplitString(const std::string& str, char s, std::vector<std::string>* r) {
- assert(r != NULL);
- r->clear();
- size_t last = 0;
- size_t c = str.size();
- for (size_t i = 0; i <= c; ++i) {
- if (i == c || str[i] == s) {
- std::string tmp(str, last, i - last);
- // Avoid converting an empty or all-whitespace source string into a vector
- // of one empty string.
- if (i != c || !r->empty() || !tmp.empty()) {
- r->push_back(tmp);
- }
- last = i + 1;
- }
- }
-}
-
-} // namespace addressinput
-} // namespace i18n

Powered by Google App Engine
This is Rietveld 408576698