| 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("utf16"); | 5 #library("utf16"); |
| 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-16 encoded bytes. The parameters | 10 * Produce a String from a sequence of UTF-16 encoded bytes. The parameters |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 return _utf16beToUtf16CodeUnits(utf16EncodedBytes, offset + 2, | 264 return _utf16beToUtf16CodeUnits(utf16EncodedBytes, offset + 2, |
| 265 end - (offset + 2), false); | 265 end - (offset + 2), false); |
| 266 } else if (hasUtf16leBom(utf16EncodedBytes, offset, length)) { | 266 } else if (hasUtf16leBom(utf16EncodedBytes, offset, length)) { |
| 267 return _utf16leToUtf16CodeUnits(utf16EncodedBytes, offset + 2, | 267 return _utf16leToUtf16CodeUnits(utf16EncodedBytes, offset + 2, |
| 268 end - (offset + 2), false); | 268 end - (offset + 2), false); |
| 269 } else { | 269 } else { |
| 270 return _utf16beToUtf16CodeUnits( | 270 return _utf16beToUtf16CodeUnits( |
| 271 utf16EncodedBytes, offset, end - offset, false); | 271 utf16EncodedBytes, offset, end - offset, false); |
| 272 } | 272 } |
| 273 } | 273 } |
| OLD | NEW |