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

Side by Side Diff: base/utf_offset_string_conversions.h

Issue 6733031: Base: A few more files using BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/threading/non_thread_safe_impl.h ('k') | base/win/windows_version.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_UTF_OFFSET_STRING_CONVERSIONS_H_ 5 #ifndef BASE_UTF_OFFSET_STRING_CONVERSIONS_H_
6 #define BASE_UTF_OFFSET_STRING_CONVERSIONS_H_ 6 #define BASE_UTF_OFFSET_STRING_CONVERSIONS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/base_api.h"
11 #include "base/string16.h" 12 #include "base/string16.h"
12 13
13 namespace base { 14 namespace base {
14 class StringPiece; 15 class StringPiece;
15 } 16 }
16 17
17 // Like the conversions in utf_string_conversions.h, but also take offsets into 18 // Like the conversions in utf_string_conversions.h, but also take offsets into
18 // the source strings, which will be adjusted to point at the same logical place 19 // the source strings, which will be adjusted to point at the same logical place
19 // in the result strings. If this isn't possible because the offsets point past 20 // in the result strings. If this isn't possible because the offsets point past
20 // the end of the source strings or into the middle of multibyte sequences, they 21 // the end of the source strings or into the middle of multibyte sequences, they
21 // will be set to std::wstring::npos. |offset_for_adjustment| may be NULL. 22 // will be set to std::wstring::npos. |offset_for_adjustment| may be NULL.
22 bool UTF8ToWideAndAdjustOffset(const char* src, 23 BASE_API bool UTF8ToWideAndAdjustOffset(const char* src,
23 size_t src_len, 24 size_t src_len,
24 std::wstring* output, 25 std::wstring* output,
25 size_t* offset_for_adjustment); 26 size_t* offset_for_adjustment);
26 std::wstring UTF8ToWideAndAdjustOffset(const base::StringPiece& utf8, 27 BASE_API std::wstring UTF8ToWideAndAdjustOffset(const base::StringPiece& utf8,
27 size_t* offset_for_adjustment); 28 size_t* offset_for_adjustment);
28 29
29 bool UTF16ToWideAndAdjustOffset(const char16* src, 30 BASE_API bool UTF16ToWideAndAdjustOffset(const char16* src,
30 size_t src_len, 31 size_t src_len,
31 std::wstring* output, 32 std::wstring* output,
32 size_t* offset_for_adjustment); 33 size_t* offset_for_adjustment);
33 std::wstring UTF16ToWideAndAdjustOffset(const string16& utf16, 34 BASE_API std::wstring UTF16ToWideAndAdjustOffset(const string16& utf16,
34 size_t* offset_for_adjustment); 35 size_t* offset_for_adjustment);
35 36
36 #endif // BASE_UTF_OFFSET_STRING_CONVERSIONS_H_ 37 #endif // BASE_UTF_OFFSET_STRING_CONVERSIONS_H_
OLDNEW
« no previous file with comments | « base/threading/non_thread_safe_impl.h ('k') | base/win/windows_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698