| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <i386/types.h> |
| 6 | 6 #include <stdbool.h> |
| 7 #include "build/build_config.h" | 7 #include <stddef.h> |
| 8 | |
| 9 #include <ctype.h> | |
| 10 #include <errno.h> | |
| 11 #include <math.h> | |
| 12 #include <stdarg.h> | |
| 13 #include <stdio.h> | |
| 14 #include <stdlib.h> | |
| 15 #include <string.h> | |
| 16 #include <time.h> | |
| 17 #include <wchar.h> | 8 #include <wchar.h> |
| 18 #include <wctype.h> | |
| 19 | |
| 20 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> |
| 21 #include <vector> | 11 #include <vector> |
| 22 | 12 |
| 23 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 24 #include "base/logging.h" | 14 #include "base/logging.h" |
| 25 #include "base/singleton.h" | 15 #include "base/singleton.h" |
| 26 #include "base/third_party/dmg_fp/dmg_fp.h" | 16 #include "base/string16.h" |
| 17 #include "base/string_piece.h" |
| 18 #include "base/string_util.h" |
| 19 #include "base/string_util_posix.h" |
| 20 #include "base/third_party/icu/icu_utf.h" |
| 27 #include "base/utf_string_conversion_utils.h" | 21 #include "base/utf_string_conversion_utils.h" |
| 28 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 29 #include "base/third_party/icu/icu_utf.h" | |
| 30 | 23 |
| 31 namespace { | 24 namespace { |
| 32 | 25 |
| 33 // Force the singleton used by Empty[W]String[16] to be a unique type. This | 26 // Force the singleton used by Empty[W]String[16] to be a unique type. This |
| 34 // prevents other code that might accidentally use Singleton<string> from | 27 // prevents other code that might accidentally use Singleton<string> from |
| 35 // getting our internal one. | 28 // getting our internal one. |
| 36 struct EmptyStrings { | 29 struct EmptyStrings { |
| 37 EmptyStrings() {} | 30 EmptyStrings() {} |
| 38 const std::string s; | 31 const std::string s; |
| 39 const std::wstring ws; | 32 const std::wstring ws; |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 } | 1080 } |
| 1088 | 1081 |
| 1089 } // namespace | 1082 } // namespace |
| 1090 | 1083 |
| 1091 size_t base::strlcpy(char* dst, const char* src, size_t dst_size) { | 1084 size_t base::strlcpy(char* dst, const char* src, size_t dst_size) { |
| 1092 return lcpyT<char>(dst, src, dst_size); | 1085 return lcpyT<char>(dst, src, dst_size); |
| 1093 } | 1086 } |
| 1094 size_t base::wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size) { | 1087 size_t base::wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size) { |
| 1095 return lcpyT<wchar_t>(dst, src, dst_size); | 1088 return lcpyT<wchar_t>(dst, src, dst_size); |
| 1096 } | 1089 } |
| OLD | NEW |