Chromium Code Reviews| Index: runtime/bin/utils.h |
| diff --git a/runtime/bin/utils.h b/runtime/bin/utils.h |
| index 60beef1ade10b4a56de41d5b1557d3c63601a87e..49dc2f18112c82ac8e643afce3bde13c53f199cc 100644 |
| --- a/runtime/bin/utils.h |
| +++ b/runtime/bin/utils.h |
| @@ -63,14 +63,35 @@ class StringUtils { |
| // conversions are only needed on Windows. If the methods returns a |
| // pointer that is different from the input pointer the returned |
|
Lasse Reichstein Nielsen
2015/06/22 12:08:34
comma after second "pointer"
Søren Gjesse
2015/06/23 11:17:59
Done.
|
| // pointer is allocated with malloc and should be freed using free. |
| - static const char* ConsoleStringToUtf8(const char* str); |
| - static char* ConsoleStringToUtf8(char* str); |
| - static const char* Utf8ToConsoleString(const char* utf8); |
| - static char* Utf8ToConsoleString(char* utf8); |
| - static char* WideToUtf8(wchar_t* wide); |
| - static const char* WideToUtf8(const wchar_t* wide); |
| - static wchar_t* Utf8ToWide(char* utf8); |
| - static const wchar_t* Utf8ToWide(const char* utf8); |
| + // |
| + // If the len argument is passed that number of characters are |
|
Lasse Reichstein Nielsen
2015/06/22 12:08:34
comma after "passed", or add a "then".
Søren Gjesse
2015/06/23 11:17:59
Done.
|
| + // converted. If len is -1 convertion until a null character will ve |
|
kustermann
2015/06/22 11:11:21
ve -> be
Lasse Reichstein Nielsen
2015/06/22 12:08:34
If len is -1, conversion will stop at the first NU
Søren Gjesse
2015/06/23 11:17:59
Done.
Søren Gjesse
2015/06/23 11:17:59
Done.
|
| + // performed. If result_len is not NULL this is set to the number of |
|
Lasse Reichstein Nielsen
2015/06/22 12:08:34
this is set -> , it is used to set
Søren Gjesse
2015/06/23 11:17:59
Done.
|
| + // characters in the result. |
| + static const char* ConsoleStringToUtf8(const char* str, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static char* ConsoleStringToUtf8(char* str, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static const char* Utf8ToConsoleString(const char* utf8, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static char* Utf8ToConsoleString(char* utf8, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static char* WideToUtf8(wchar_t* wide, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static const char* WideToUtf8(const wchar_t* wide, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static wchar_t* Utf8ToWide(char* utf8, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| + static const wchar_t* Utf8ToWide(const char* utf8, |
| + intptr_t len = -1, |
| + intptr_t* result_len = NULL); |
| }; |
| class ShellUtils { |