Skip to content
pubscout

alphanum_comparator

2.0.3, released 2 years ago by quantos.it

Sorts string lists alphanumerically using The Alphanum Algorithm.

WASM-ready
$ flutter pub add alphanum_comparator
Source repository

What it does

Provides a comparator to sort strings containing a mix of letters and numbers in a natural human-readable order. It compares numbers by their values rather than standard ASCII character order.

AI-written summary of version 2.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to sort filenames or product names that combine letters and numbers naturally.
  • You want to avoid traditional ASCII sorting issues where 'z100' comes before 'z2'.

Skip it when

  • You require standard strict ASCII character sorting.
  • You need specialized domain sorting not covered by alphanumeric rules.

Strengths

  • Provides intuitive natural sorting for mixed alphanumeric strings.
  • No external dependencies and lightweight Dart-only library.

Weaknesses

  • License is unknown.
  • Very narrow and specific utility scope.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
not documented

Alternatives

Packages that do the same job and could replace alphanum_comparator.

  • validators2

    String validation and sanitization for Dart.

  • bidi

    Converts logical RTL strings to their visual representation using the Unicode Bidirectional Algorithm.

  • fuzzy_bolt

    High-performance fuzzy search algorithm with typo tolerance and Porter stemming.

  • http_methods

    Provides a list of IANA‑registered HTTP methods and helper functions to check them.