| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BIN_UTILS_WIN_H_ | 5 #ifndef BIN_UTILS_WIN_H_ |
| 6 #define BIN_UTILS_WIN_H_ | 6 #define BIN_UTILS_WIN_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| 11 namespace bin { | 11 namespace bin { |
| 12 | 12 |
| 13 void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length); | 13 void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length); |
| 14 | 14 |
| 15 class StringUtilsWin { |
| 16 public: |
| 17 static char* WideToUtf8(wchar_t* wide, |
| 18 intptr_t len = -1, |
| 19 intptr_t* result_len = NULL); |
| 20 static const char* WideToUtf8(const wchar_t* wide, |
| 21 intptr_t len = -1, |
| 22 intptr_t* result_len = NULL); |
| 23 static wchar_t* Utf8ToWide(char* utf8, |
| 24 intptr_t len = -1, |
| 25 intptr_t* result_len = NULL); |
| 26 static const wchar_t* Utf8ToWide(const char* utf8, |
| 27 intptr_t len = -1, |
| 28 intptr_t* result_len = NULL); |
| 29 }; |
| 30 |
| 15 } // namespace bin | 31 } // namespace bin |
| 16 } // namespace dart | 32 } // namespace dart |
| 17 | 33 |
| 18 #endif // BIN_UTILS_WIN_H_ | 34 #endif // BIN_UTILS_WIN_H_ |
| OLD | NEW |