W3cubDocs

/Dart 2

getByName method

Encoding getByName (String name)

Gets an Encoding object from the name of the character set name. The names used are the IANA official names for the character set (see http://www.iana.org/assignments/character-sets/character-sets.xml).

The name passed is case insensitive.

If character set is not supported null is returned.

Implementation

static Encoding getByName(String name) {
  if (name == null) return null;
  name = name.toLowerCase();
  return _nameToEncoding[name];
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-convert/Encoding/getByName.html