p-hatan/ mirror

pub repository

mirror.p-hatan.ir

charcode

1.2.0-nullsafety

Constants for ASCII and common non-ASCII character codes represented by top-level constants.

Download archive

Readme

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.

Changelog

1.2.0-nullsafety

  • Opt in to null safety.

1.1.3

  • Added example, fixed recommended lints.

1.1.2

  • Updated the SDK constraint.

1.1.1

  • Spelling fixes.

  • Linting fixes.

1.1.0

  • Initial version

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add charcode
pubspec.yaml
name: charcode
version: 1.2.0-nullsafety
description: >-
  Constants for ASCII and common non-ASCII character codes represented by
  top-level constants.
homepage: https://github.com/dart-lang/charcode

environment:
  # This must remain a tight constraint until nnbd is stable
  sdk: '>=2.10.0-0 <2.10.0'

dev_dependencies:
  pedantic: ^1.0.0

Version history

VersionPublishedArchiveSHA-256
1.0.02014-06-26T09:28:21.694420ZDownload512b3f1f0a693a346c37bb616281ffd4ffe886b6de11fa62f06e2f4294b30efc
1.0.0+12014-09-05T09:47:41.933800ZDownload0f9c762b81ee6b0963eac97c1f894aabcb6fc0ba2c3b15a96acf9859e4e8838f
1.1.02014-09-10T09:54:12.532630ZDownloadc510584ba541a09cc6b97272138d47af095efc2c69e10629ebb0fdd0ae59db6f
1.1.12016-11-19T17:35:15.793ZDownloadc3a733a042234bbe813741c41a298232ce162feb6ffd2b368b54aa1d995256e0
1.1.22018-07-11T17:46:00.382487ZDownload3b2184de710a811255c3243d36dd0da64d86ae7b53ab026973ccd573a1a4b987
1.1.32020-02-11T15:37:32.663984ZDownloadabac3bd18780f688ff2b93914f7ed2d4e9405835cbed1f09298ef65e278f23a2
1.2.0-nullsafety2020-07-29T16:13:16.511645ZDownload4bc611337e54c8f7a2d0c05394c56372116ba430defb4f4a94c5b97b17e74d39
1.2.0-nullsafety.12020-09-22T15:49:23.459366ZDownloadbe9446ac9253d431979b8bf1b08588234e7ae0d1442ff5bab286c6c64bb03622
1.2.0-nullsafety.22020-10-26T10:44:46.720944ZDownload395cc0e31d6a7b9288955779d5fedc13ef8c9aae93551fd4d5e7d45f46e91dd5
1.2.0-nullsafety.32020-11-04T10:56:47.500858ZDownload438cd4d6e819eae86b02fbf1257ce68ea55c117c3e24f0c01b3ba9af5faff403
1.2.02021-02-02T17:11:52.888788ZDownload8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362
1.3.02021-06-09T13:15:32.450552ZDownloadad3e299d61ecac58b5ca8995b7b0650d3463a4cdb74dc4c7ccc5c5f775931105
1.3.12021-06-09T14:13:16.454868ZDownloadfb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
1.4.02024-11-18T13:03:59.677834ZDownloadfb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a

Dependencies

No direct dependencies declared.