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

Unified Diff: base/utf_offset_string_conversions.h

Issue 7828092: Add UTF16ToUTF8AndAdjustOffset() to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use vector version in single-offset version. Created 9 years, 3 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
« no previous file with comments | « no previous file | base/utf_offset_string_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/utf_offset_string_conversions.h
diff --git a/base/utf_offset_string_conversions.h b/base/utf_offset_string_conversions.h
index 01177b655dc2d1d94139c1cdfdd8be94dd6c33b8..c2faf3a491599cf33648d06380fd8525876d7868 100644
--- a/base/utf_offset_string_conversions.h
+++ b/base/utf_offset_string_conversions.h
@@ -14,6 +14,7 @@
namespace base {
class StringPiece;
+class StringPiece16;
}
// Like the conversions in utf_string_conversions.h, but also takes one or more
@@ -38,6 +39,13 @@ BASE_EXPORT string16 UTF8ToUTF16AndAdjustOffsets(
const base::StringPiece& utf8,
std::vector<size_t>* offsets_for_adjustment);
+BASE_EXPORT std::string UTF16ToUTF8AndAdjustOffset(
+ const base::StringPiece16& utf16,
+ size_t* offset_for_adjustment);
+BASE_EXPORT std::string UTF16ToUTF8AndAdjustOffsets(
+ const base::StringPiece16& utf16,
+ std::vector<size_t>* offsets_for_adjustment);
+
// Limiting function callable by std::for_each which will replace any value
// which is equal to or greater than |limit| with npos.
template <typename T>
« no previous file with comments | « no previous file | base/utf_offset_string_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698