charcode 1.1.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 89

Character code constants.

Build Status Pub

These libraries define symbolic names for some character codes.

Using

Import either one of the libraries:

import "package:charcode/ascii.dart";
import "package:charcode/html_entity.dart";

or import both libraries using the charcode.dart library:

import "package:charcode/charcode.dart";

Naming

The character names are preceded by a $ to avoid conflicting with other variables due to the short and common names (for example "$i").

The characters that are valid in a Dart identifier directly follow the $. Examples: $_, $a, $B and $3. Other characters are given symbolic names.

The names of letters are lower-case for lower-case letters, and mixed- or upper-case for upper-case letters. The names of symbols are all lower-case, and omit suffixes like "sign", "symbol" and "mark". Examples: $plus, $exclamation

The ascii.dart library defines a symbolic name for each ASCII character. For some characters, it has more than one name. For example the common $tab and the official $ht for the horizontal tab.

The html_entity.dart library defines a constant for each HTML 4.01 character entity, using the standard entity abbreviation, including its case. Examples: $nbsp for &nbps;, $aring for the lower-case å and $Aring for the upper-case Å.

The HTML entities includes all characters in the Latin-1 code page, greek letters and some mathematical symbols.

The charcode.dart library just exports both ascii.dart and html_entity.dart.

Rationale

The Dart language doesn't have character literals. If that ever happens, this library will be irrelevant. Until then, this library can be used for the most common characters. See request for character literals.

1.1.1

  • Spelling fixes.

  • Linting fixes.

1.1.0

  • Initial version

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  charcode: "^1.1.1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:charcode/charcode.dart';
        
Version Uploaded Documentation Archive
1.1.1 Nov 19, 2016 Go to the documentation of charcode 1.1.1 Download charcode 1.1.1 archive
1.1.0 Sep 10, 2014 Go to the documentation of charcode 1.1.0 Download charcode 1.1.0 archive
1.0.0+1 Sep 5, 2014 Go to the documentation of charcode 1.0.0+1 Download charcode 1.0.0+1 archive
1.0.0 Jun 26, 2014 Go to the documentation of charcode 1.0.0 Download charcode 1.0.0 archive

Analysis

This feature is new.
We welcome feedback.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Dec 6, 2017
  • Dart: 2.0.0-dev.8.0
  • pana: 0.7.3+1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
88
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
75
Overall score:
Weighted score of the above. [more]
89

Platforms

Detected platforms: Flutter, server, web

All libraries agree

Suggestions

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.