string_unescape 1.5.1

  • Readme
  • Changelog
  • Installing
  • 79

String unescape #

Handy utility to unescape string representation (unicode, newline, tab, etc).

Example #

Unescape string #

expect(unescape(r"a\nb"), "a\nb");
expect(unescape(r"a\x0ab"), "a\nb");

Unescape character #

expect(unescapeChar(r"a"), 97);
expect(unescapeChar(r"🀀"), 0x1F000);

1.5.1 #

  • Implements unescape and unescapeChar

Use this package as a library

1. Depend on it

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

  string_unescape: ^1.5.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:string_unescape/string_unescape.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Health issues and suggestions

Document public APIs. (-1 points)

3 out of 3 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/unicode_unescape_base.dart.

Run dartfmt to format lib/src/unicode_unescape_base.dart.

Format lib/string_unescape.dart.

Run dartfmt to format lib/string_unescape.dart.

Maintenance suggestions

Package is getting outdated. (-6.30 points)

The package was last published 55 weeks ago.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and string_unescape.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
Dev dependencies
pedantic ^1.0.0
test ^1.0.0