| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.convert; | 5 part of dart.convert; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Open-ended Encoding enum. | 8 * Open-ended Encoding enum. |
| 9 */ | 9 */ |
| 10 abstract class Encoding extends Codec<String, List<int>> { | 10 abstract class Encoding extends Codec<String, List<int>> { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 * Gets an [Encoding] object from the name of the character set | 62 * Gets an [Encoding] object from the name of the character set |
| 63 * name. The names used are the IANA official names for the | 63 * name. The names used are the IANA official names for the |
| 64 * character set (see | 64 * character set (see |
| 65 * http://www.iana.org/assignments/character-sets/character-sets.xml). | 65 * http://www.iana.org/assignments/character-sets/character-sets.xml). |
| 66 * | 66 * |
| 67 * The [name] passed is case insensitive. | 67 * The [name] passed is case insensitive. |
| 68 * | 68 * |
| 69 * If character set is not supported [:null:] is returned. | 69 * If character set is not supported [:null:] is returned. |
| 70 */ | 70 */ |
| 71 static Encoding getByName(String name) { | 71 static Encoding getByName(String name) { |
| 72 if (name == null) return null; | 72 if (name == null) return null; |
| 73 name = name.toLowerCase(); | 73 name = name.toLowerCase(); |
| 74 return _nameToEncoding[name]; | 74 return _nameToEncoding[name]; |
| 75 } | 75 } |
| 76 } | 76 } |
| OLD | NEW |