| 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 #library("utf32"); | 5 #library("utf32"); |
| 6 #import("unicode_core.dart"); | 6 #import("unicode_core.dart"); |
| 7 #import("unicode.dart"); | 7 #import("unicode.dart"); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Produce a String from a sequence of UTF-32 encoded bytes. The parameters | 10 * Produce a String from a sequence of UTF-32 encoded bytes. The parameters |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } else { | 264 } else { |
| 265 return _utf32beToCodePoints(utf32EncodedBytes, offset, end - offset); | 265 return _utf32beToCodePoints(utf32EncodedBytes, offset, end - offset); |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 bool _validCodepoint(int codepoint) { | 269 bool _validCodepoint(int codepoint) { |
| 270 return (codepoint >= 0 && codepoint < UNICODE_UTF16_RESERVED_LO) || | 270 return (codepoint >= 0 && codepoint < UNICODE_UTF16_RESERVED_LO) || |
| 271 (codepoint > UNICODE_UTF16_RESERVED_HI && | 271 (codepoint > UNICODE_UTF16_RESERVED_HI && |
| 272 codepoint < UNICODE_VALID_RANGE_MAX); | 272 codepoint < UNICODE_VALID_RANGE_MAX); |
| 273 } | 273 } |
| OLD | NEW |