PackageTrack
Sign in Get early access

string_scanner

A class for parsing strings using a sequence of patterns.

1.4.1 9.3M downloads/mo #38 most downloaded on pub.dev dart-lang/tools

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 1.7 years

Nearly every release is documented

notes for 23 of 24 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

28 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

28 releases · Apr 2014 to Dec 2024
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 28
  1. 1.4.1 17 Dec 2024
    Release notes
    • Move to dart-lang/tools monorepo.
    Open source →
  2. 1.4.0 16 Oct 2024
    Release notes
    • Fix LineScanner's handling of \r\n's to preventing errors scanning zero-length matches when between CR and LF. CR is treated as a new line only if not immediately followed by a LF.
    • Fix LineScanner's updating of column when setting position if the current position is not 0.
    Open source →
  3. 1.3.0 11 Jul 2024
    Release notes
    • Require Dart 3.1.0

    • Add a SpanScanner.spanFromPosition() method which takes raw code units rather than SpanScanner.spanFrom()'s LineScannerStates.

    Open source →
  4. 1.2.0 31 Oct 2022
    Release notes
    • Require Dart 2.18.0

    • Add better support for reading code points in the Unicode supplementary plane:

      • Added StringScanner.readCodePoint(), which consumes an entire Unicode code point even if it's represented by two UTF-16 code units.

      • Added StringScanner.peekCodePoint(), which returns an entire Unicode code point even if it's represented by two UTF-16 code units.

      • StringScanner.scanChar() and StringScanner.expectChar() will now properly consume two UTF-16 code units if they're passed Unicode code points in the supplementary plane.

    Open source →
  5. 1.1.1 12 May 2022
    Release notes
    • Populate the pubspec repository field.
    • Switch to package:lints.
    • Remove a dependency on package:charcode.
    Open source →
  6. 1.1.0 02 Feb 2021
    Release notes
    • Stable release for null safety.
    Open source →
  7. 1.1.0-nullsafety.3 03 Nov 2020 pre-release
    Release notes
    • Update SDK constraints to >=2.12.0-0 <3.0.0 based on beta release guidelines.
    Open source →
  8. 1.1.0-nullsafety.2 23 Oct 2020 pre-release
    Release notes
    • Allow prerelease versions of the 2.12 sdk.
    Open source →
  9. 1.1.0-nullsafety.1 22 Sep 2020 pre-release
    Release notes
    • Allow 2.10 stable and 2.11.0 dev SDK versions.
    Open source →
  10. 1.1.0-nullsafety 29 Jul 2020 pre-release
    Release notes
    • Migrate to null safety.
    Open source →
  11. 1.0.5 31 Jul 2019
    Release notes
    • Added an example.

    • Update Dart SDK constraint to >=2.0.0 <3.0.0.

    Open source →
  12. 1.0.4 13 Aug 2018
    Release notes
    • Add @alwaysThrows annotation to error method.
    Open source →
  13. 1.0.3 18 Jul 2018
    Release notes
    • Set max SDK version to <3.0.0, and adjust other dependencies.
    Open source →
  14. 1.0.2 22 May 2017
    Release notes
    • SpanScanner no longer crashes when creating a span that contains a UTF-16 surrogate pair.
    Open source →
  15. 1.0.1 02 Nov 2016
    Release notes
    • Fix the error text emitted by StringScanner.expectChar().
    Open source →
  16. 1.0.0 14 Jun 2016
    Release notes
    • Breaking change: StringScanner.error()'s length argument now defaults to 0 rather than 1 when no match data is available.

    • Breaking change: StringScanner.lastMatch and related methods are now reset when the scanner's position changes without producing a new match.

    Note: While the changes in 1.0.0 are user-visible, they're unlikely to actually break any code in practice. Unless you know that your package is incompatible with 0.1.x, consider using 0.1.5 as your lower bound rather than 1.0.0. For example, string_scanner: ">=0.1.5 <2.0.0".

    Open source →
  17. 0.1.5 06 Jun 2016
    Release notes
    • Add new SpanScanner.within(), which scans within a existing FileSpan.

    • Add StringScanner.scanChar() and StringScanner.expectChar().

    Open source →
  18. 0.1.4 02 Sep 2015
    Release notes
    • Add new SpanScanner.eager() for creating a SpanScanner that eagerly computes its current line and column numbers.
    Open source →
  19. 0.1.4+1 15 Jan 2016
    Release notes
    • Remove the dependency on path, since we don't actually import it.
    Open source →
  20. 0.1.3 12 Dec 2014
    Release notes
    • Add an optional endState argument to SpanScanner.spanFrom.
    Open source →
  21. 0.1.3+1 30 Mar 2015
    Release notes
    • Fixed the homepage URL.
    Open source →
  22. 0.1.3+2 02 Sep 2015
    Release notes
    • Fix LineScanner's handling of carriage returns to match that of SpanScanner.
    Open source →
  23. 0.1.2 05 Nov 2014
    Release notes
    • Add StringScanner.substring, which returns a substring of the source string.
    Open source →
  24. 0.1.1 29 Oct 2014
    Release notes
    • Declare SpanScanner's exposed SourceSpans and SourceLocations to be FileSpans and FileLocations. They always were underneath, but callers may now rely on it.

    • Add SpanScanner.location, which returns the scanner's current SourceLocation.

    Open source →
  25. 0.1.0 24 Jul 2014
    Release notes
    • Switch from source_maps' Span class to source_span's SourceSpan class.

    • new StringScanner()'s sourceUrl parameter is now named to make it clear that it can be safely null.

    • new StringScannerException() takes different arguments in a different order to match SpanFormatException.

    • StringScannerException.string has been renamed to StringScannerException.source to match the FormatException interface.

    Open source →
  26. 0.0.3 23 Jun 2014
    Release notes
    • Make StringScannerException inherit from source_map's SpanFormatException.
    Open source →
  27. 0.0.2 30 May 2014
    Release notes
    • new StringScanner() now takes an optional sourceUrl argument that provides the URL of the source file. This is used for error reporting.

    • Add StringScanner.readChar() and StringScanner.peekChar() methods for doing character-by-character scanning.

    • Scanners now throw StringScannerExceptions which provide more detailed access to information about the errors that were thrown and can provide terminal-colored messages.

    • Add a LineScanner subclass of StringScanner that automatically tracks line and column information of the text being scanned.

    • Add a SpanScanner subclass of LineScanner that exposes matched ranges as [source map][] Span objects.

    Open source →
  28. 0.0.1 02 Apr 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive