html_character_entities 0.0.3 copy "html_character_entities: ^0.0.3" to clipboard
html_character_entities: ^0.0.3 copied to clipboard

outdated

A Dart utility class containing a map of key/value pairs for every HTML 4.01 character entity, including ASCII codes, and a method to parse strings for those character entities.

html_character_entities #

A Dart utility class containing a map of key/value pairs for every HTML 4.01 character entity, including ASCII codes, and a method to parse strings for those character entities.

Using #

import 'package:html_character_entities/html_character_entities.dart';

Parsing Strings #

String string = 'An ampersand can be written as & and &.';

print(HtmlCharacterEntities.parse(string)); // An ampersand can be written as & and &.

Map #

final Map<String, String> c = HtmlCharacterEntities.characters;

String string = 'There are 4 suites of cards: ${c['&spades;']} Spades, ${c['&clubs;']} Clubs, ${c['&hearts;']} Hearts, ${c['&diams;']} Diamonds';

print(string); // There are 4 suites of cards: ♠ Spades, ♣ Clubs, ♥ Hearts, ♦ Diamonds
21
likes
0
pub points
92%
popularity

Publisher

verified publisherjamesalex.dev

A Dart utility class containing a map of key/value pairs for every HTML 4.01 character entity, including ASCII codes, and a method to parse strings for those character entities.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on html_character_entities