OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // We can't use snprintf since it's not supported on all relevant platforms. | 46 // We can't use snprintf since it's not supported on all relevant platforms. |
47 // We can't use OS::SNPrintF, it's only for internal code. | 47 // We can't use OS::SNPrintF, it's only for internal code. |
48 static void StrNCopy(char* dest, int length, const char* src); | 48 static void StrNCopy(char* dest, int length, const char* src); |
49 | 49 |
50 // Extract a string setting named in |settings| and set it to |result|. | 50 // Extract a string setting named in |settings| and set it to |result|. |
51 // Return true if it's specified. Otherwise, return false. | 51 // Return true if it's specified. Otherwise, return false. |
52 static bool ExtractStringSetting(const v8::Handle<v8::Object>& settings, | 52 static bool ExtractStringSetting(const v8::Handle<v8::Object>& settings, |
53 const char* setting, | 53 const char* setting, |
54 icu::UnicodeString* result); | 54 icu::UnicodeString* result); |
55 | 55 |
| 56 // Converts ASCII array into UChar array. |
| 57 // Target is always \0 terminated. |
| 58 static void AsciiToUChar(const char* source, |
| 59 int32_t source_length, |
| 60 UChar* target, |
| 61 int32_t target_length); |
| 62 |
56 private: | 63 private: |
57 I18NUtils() {} | 64 I18NUtils() {} |
58 }; | 65 }; |
59 | 66 |
60 } } // namespace v8::internal | 67 } } // namespace v8::internal |
61 | 68 |
62 #endif // V8_EXTENSIONS_EXPERIMENTAL_I18N_UTILS_H_ | 69 #endif // V8_EXTENSIONS_EXPERIMENTAL_I18N_UTILS_H_ |
OLD | NEW |