Search packages, repositories and app categories

Package detailsv2.0.0

string_unescape

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

AndroidiOSWebmacOSWindowsLinux
30-day downloads
29.1K
Likes
6
Pub points
140

Install package

flutter pub add string_unescape

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A lightweight Flutter/Dart package that provides utility functions to unescape common string representations, including Unicode escape sequences, newlines, tabs, and other special characters. It simplifies parsing and processing of strings that contain escaped literals, making it easier to work with formatted text from external sources like JSON, configuration files, or user input. The package is platform-agnostic and supports all major Flutter platforms.

Use cases

  • Parsing escaped JSON strings
  • Processing configuration files with escaped characters
  • Handling user input with special escapes
  • Converting raw string literals to readable format
  • Cleaning up imported text data

Key features

  • Supports Unicode unescaping
  • Handles newline and tab sequences
  • Simple API for quick integration
  • Cross-platform compatibility
  • Lightweight and dependency-free

Suitable for

  • Text processing apps
  • Data import/export tools
  • Configuration parsers
  • Developer utilities
  • String manipulation libraries

Considerations

  • Does not handle complex regex patterns
  • Limited to basic escape sequences
  • Not suitable for full-fledged string formatting
  • Requires manual handling of edge cases
  • No built-in validation for malformed inputs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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);

Categories

Source repository

Projects using this package

No data available yet.