pub repository
mirror.p-hatan.comcharcode
1.2.0-nullsafety.1Constants for ASCII and common non-ASCII character codes represented by top-level constants.
Readme
Character code constants.
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.1
- Allow 2.10 stable and 2.11.0 dev SDK versions.
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.com
flutter pub add charcodepubspec.yaml
name: charcode
version: 1.2.0-nullsafety.1
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.11.0'
dev_dependencies:
pedantic: ^1.0.0
# dependency_overrides:
# async:
# git: git://github.com/dart-lang/async.git
# boolean_selector:
# git: git://github.com/dart-lang/boolean_selector.git
# charcode:
# git: git://github.com/dart-lang/charcode.git
# collection:
# git: git://github.com/dart-lang/collection.git
# js:
# git:
# url: git://github.com/dart-lang/sdk.git
# path: pkg/js
# ref: 2-10-pkgs
# matcher:
# git: git://github.com/dart-lang/matcher.git
# meta:
# git:
# url: git://github.com/dart-lang/sdk.git
# path: pkg/meta
# ref: 2-10-pkgs
# path:
# git: git://github.com/dart-lang/path.git
# pedantic:
# git: git://github.com/dart-lang/pedantic.git
# pool:
# git: git://github.com/dart-lang/pool.git
# source_maps:
# git: git://github.com/dart-lang/source_maps.git
# source_map_stack_trace:
# git: git://github.com/dart-lang/source_map_stack_trace.git
# source_span:
# git: git://github.com/dart-lang/source_span.git
# stack_trace:
# git: git://github.com/dart-lang/stack_trace.git
# stream_channel:
# git: git://github.com/dart-lang/stream_channel.git
# string_scanner:
# git: git://github.com/dart-lang/string_scanner.git
# term_glyph:
# git: git://github.com/dart-lang/term_glyph.git
# test_api:
# git:
# url: git://github.com/dart-lang/test.git
# path: pkgs/test_api
# test_core:
# git:
# url: git://github.com/dart-lang/test.git
# path: pkgs/test_core
# test:
# git:
# url: git://github.com/dart-lang/test.git
# path: pkgs/test
# typed_data:
# git: git://github.com/dart-lang/typed_data.git
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | 2014-06-26T09:28:21.694420Z | Download | 512b3f1f0a693a346c37bb616281ffd4ffe886b6de11fa62f06e2f4294b30efc |
| 1.0.0+1 | 2014-09-05T09:47:41.933800Z | Download | 0f9c762b81ee6b0963eac97c1f894aabcb6fc0ba2c3b15a96acf9859e4e8838f |
| 1.1.0 | 2014-09-10T09:54:12.532630Z | Download | c510584ba541a09cc6b97272138d47af095efc2c69e10629ebb0fdd0ae59db6f |
| 1.1.1 | 2016-11-19T17:35:15.793Z | Download | c3a733a042234bbe813741c41a298232ce162feb6ffd2b368b54aa1d995256e0 |
| 1.1.2 | 2018-07-11T17:46:00.382487Z | Download | 3b2184de710a811255c3243d36dd0da64d86ae7b53ab026973ccd573a1a4b987 |
| 1.1.3 | 2020-02-11T15:37:32.663984Z | Download | abac3bd18780f688ff2b93914f7ed2d4e9405835cbed1f09298ef65e278f23a2 |
| 1.2.0-nullsafety | 2020-07-29T16:13:16.511645Z | Download | 4bc611337e54c8f7a2d0c05394c56372116ba430defb4f4a94c5b97b17e74d39 |
| 1.2.0-nullsafety.1 | 2020-09-22T15:49:23.459366Z | Download | be9446ac9253d431979b8bf1b08588234e7ae0d1442ff5bab286c6c64bb03622 |
| 1.2.0-nullsafety.2 | 2020-10-26T10:44:46.720944Z | Download | 395cc0e31d6a7b9288955779d5fedc13ef8c9aae93551fd4d5e7d45f46e91dd5 |
| 1.2.0-nullsafety.3 | 2020-11-04T10:56:47.500858Z | Download | 438cd4d6e819eae86b02fbf1257ce68ea55c117c3e24f0c01b3ba9af5faff403 |
| 1.2.0 | 2021-02-02T17:11:52.888788Z | Download | 8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362 |
| 1.3.0 | 2021-06-09T13:15:32.450552Z | Download | ad3e299d61ecac58b5ca8995b7b0650d3463a4cdb74dc4c7ccc5c5f775931105 |
| 1.3.1 | 2021-06-09T14:13:16.454868Z | Download | fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 |
| 1.4.0 | 2024-11-18T13:03:59.677834Z | Download | fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a |
Dependencies
No direct dependencies declared.