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

Side by Side Diff: base/strings/string_util.cc

Issue 16331011: Move string files in base/ to the string subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « base/strings/string_util.h ('k') | base/strings/string_util_constants.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_util.h" 5 #include "base/strings/string_util.h"
6
7 #include "build/build_config.h"
8 6
9 #include <ctype.h> 7 #include <ctype.h>
10 #include <errno.h> 8 #include <errno.h>
11 #include <math.h> 9 #include <math.h>
12 #include <stdarg.h> 10 #include <stdarg.h>
13 #include <stdio.h> 11 #include <stdio.h>
14 #include <stdlib.h> 12 #include <stdlib.h>
15 #include <string.h> 13 #include <string.h>
16 #include <time.h> 14 #include <time.h>
17 #include <wchar.h> 15 #include <wchar.h>
18 #include <wctype.h> 16 #include <wctype.h>
19 17
20 #include <algorithm> 18 #include <algorithm>
21 #include <vector> 19 #include <vector>
22 20
23 #include "base/basictypes.h" 21 #include "base/basictypes.h"
24 #include "base/logging.h" 22 #include "base/logging.h"
25 #include "base/memory/singleton.h" 23 #include "base/memory/singleton.h"
26 #include "base/strings/utf_string_conversion_utils.h" 24 #include "base/strings/utf_string_conversion_utils.h"
27 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
28 #include "base/third_party/icu/icu_utf.h" 26 #include "base/third_party/icu/icu_utf.h"
27 #include "build/build_config.h"
29 28
30 namespace { 29 namespace {
31 30
32 // Force the singleton used by Empty[W]String[16] to be a unique type. This 31 // Force the singleton used by Empty[W]String[16] to be a unique type. This
33 // prevents other code that might accidentally use Singleton<string> from 32 // prevents other code that might accidentally use Singleton<string> from
34 // getting our internal one. 33 // getting our internal one.
35 struct EmptyStrings { 34 struct EmptyStrings {
36 EmptyStrings() {} 35 EmptyStrings() {}
37 const std::string s; 36 const std::string s;
38 const std::wstring ws; 37 const std::wstring ws;
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 } 1002 }
1004 1003
1005 } // namespace 1004 } // namespace
1006 1005
1007 size_t base::strlcpy(char* dst, const char* src, size_t dst_size) { 1006 size_t base::strlcpy(char* dst, const char* src, size_t dst_size) {
1008 return lcpyT<char>(dst, src, dst_size); 1007 return lcpyT<char>(dst, src, dst_size);
1009 } 1008 }
1010 size_t base::wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size) { 1009 size_t base::wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size) {
1011 return lcpyT<wchar_t>(dst, src, dst_size); 1010 return lcpyT<wchar_t>(dst, src, dst_size);
1012 } 1011 }
OLDNEW
« 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