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

Side by Side Diff: third_party/libaddressinput/chromium/cpp/src/util/string_split.h

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, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // The original source code is from:
6 // http://src.chromium.org/viewvc/chrome/trunk/src/base/strings/string_split.h?r evision=236210
7 //
8 // Modifications from original:
9 // 1) Supports only std::string type.
10 // 2) Does not trim whitespace.
11
12 #ifndef I18N_ADDRESSINPUT_UTIL_STRING_SPLIT_H_
13 #define I18N_ADDRESSINPUT_UTIL_STRING_SPLIT_H_
14
15 #include <string>
16 #include <vector>
17
18 namespace i18n {
19 namespace addressinput {
20
21 // Splits |str| into a vector of strings delimited by |c|, placing the results
22 // in |r|. If several instances of |c| are contiguous, or if |str| begins with
23 // or ends with |c|, then an empty string is inserted.
24 //
25 // |str| should not be in a multi-byte encoding like Shift-JIS or GBK in which
26 // the trailing byte of a multi-byte character can be in the ASCII range.
27 // UTF-8, and other single/multi-byte ASCII-compatible encodings are OK.
28 // Note: |c| must be in the ASCII range.
29 void SplitString(const std::string& str, char c, std::vector<std::string>* r);
30
31 } // namespace addressinput
32 } // namespace i18n
33
34 #endif // I18N_ADDRESSINPUT_UTIL_STRING_SPLIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698