| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file defines utility functions for working with strings. | 5 // This file defines utility functions for working with strings. |
| 6 | 6 |
| 7 #ifndef BASE_STRINGS_STRING_UTIL_H_ | 7 #ifndef BASE_STRINGS_STRING_UTIL_H_ |
| 8 #define BASE_STRINGS_STRING_UTIL_H_ | 8 #define BASE_STRINGS_STRING_UTIL_H_ |
| 9 | 9 |
| 10 #include <ctype.h> | 10 #include <ctype.h> |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 BASE_EXPORT std::string ReplaceStringPlaceholders( | 449 BASE_EXPORT std::string ReplaceStringPlaceholders( |
| 450 const StringPiece& format_string, | 450 const StringPiece& format_string, |
| 451 const std::vector<std::string>& subst, | 451 const std::vector<std::string>& subst, |
| 452 std::vector<size_t>* offsets); | 452 std::vector<size_t>* offsets); |
| 453 | 453 |
| 454 // Single-string shortcut for ReplaceStringHolders. |offset| may be NULL. | 454 // Single-string shortcut for ReplaceStringHolders. |offset| may be NULL. |
| 455 BASE_EXPORT string16 ReplaceStringPlaceholders(const string16& format_string, | 455 BASE_EXPORT string16 ReplaceStringPlaceholders(const string16& format_string, |
| 456 const string16& a, | 456 const string16& a, |
| 457 size_t* offset); | 457 size_t* offset); |
| 458 | 458 |
| 459 BASE_EXPORT extern string16 Uint8VectorToString16( |
| 460 const std::vector<uint8_t>& input); |
| 461 |
| 462 BASE_EXPORT extern std::vector<uint8_t> String16ToUint8Vector( |
| 463 const string16& input); |
| 464 |
| 459 } // namespace base | 465 } // namespace base |
| 460 | 466 |
| 461 #if defined(OS_WIN) | 467 #if defined(OS_WIN) |
| 462 #include "base/strings/string_util_win.h" | 468 #include "base/strings/string_util_win.h" |
| 463 #elif defined(OS_POSIX) | 469 #elif defined(OS_POSIX) |
| 464 #include "base/strings/string_util_posix.h" | 470 #include "base/strings/string_util_posix.h" |
| 465 #else | 471 #else |
| 466 #error Define string operations appropriately for your platform | 472 #error Define string operations appropriately for your platform |
| 467 #endif | 473 #endif |
| 468 | 474 |
| 469 #endif // BASE_STRINGS_STRING_UTIL_H_ | 475 #endif // BASE_STRINGS_STRING_UTIL_H_ |
| OLD | NEW |