perridak_strings 0.16.1 copy "perridak_strings: ^0.16.1" to clipboard
perridak_strings: ^0.16.1 copied to clipboard

Comprehensive, zero-dependency string utilities for Dart and Flutter. Fast, safe, and rigorously tested.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased] #

0.16.1 - 2026-05-29 #

Fixed #

  • Removed deprecated author field from pubspec.yaml
  • Shortened package description to meet pub.dev guidelines (60–180 characters)

Added #

  • Example files for all modules (composition, indentation, segmentation, sentences)

0.16.0 - 2026-05-28 #

Added #

Unique String Operations (standout features)

  • firstWord() / lastWord() — Extract the first or last word from a string without manual splitting
  • removeFirstWord() / removeLastWord() — Trim words from start or end; perfect for parsing command arguments or log lines
  • chunkify() — Split strings into fixed-length chunks; essential for formatting SMS, API calls, or bandwidth-limited systems
  • safeReverse() — Reverse strings safely, preserving emoji and multi-byte character integrity (unlike naive .reversed)
  • mask() — Securely mask sensitive parts of strings (credit cards, phone numbers, passwords) with configurable patterns
  • slugify() — Convert user input to URL-safe slugs in one call; handles accents, spaces, and special characters

Composition Module (23 functions)

  • Text building: append(), prefix(), repeat()
  • Word operations: firstWord(), lastWord(), removeFirstWord(), removeLastWord()
  • Chunking & extraction: chunkify(), takeFirst(), takeLast(), removeFirst()
  • Text normalisation: normaliseAccents(), normaliseWhitespace(), removeAllWhitespace(), removeSpecialCharacters(), onlyNumbers(), onlyLetters()
  • Formatting: asSentence(), truncate(), reverse(), safeReverse(), removeLast()

Indentation Module (6 functions)

Layout and spacing control for text output:

  • indent() — Add leading whitespace to all lines
  • hangingIndent() — First line flush, subsequent lines indented (bullet lists, quotes)
  • reverseHangingIndent() — Inverse of hanging indent (wrapped text continuation)
  • removeIndent(), removeHangingIndent(), removeReverseHangingIndent() — Strip formatting

Validation Module (1 function)

  • slugify() — Production-ready slug generation with full Unicode support

Quality Metrics #

  • 825 comprehensive unit tests — Every function tested across normal, edge case, and boundary conditions
  • zero unnecessary dependencies — Pure Dart, only requires the Dart team's battle proven characters package; works everywhere (Flutter, Dart VM, Web, CLI).
  • Pre-release status — Thoroughly tested but API subject to refinement before 1.0.0

What's Next (Roadmap) #

Future releases will add:

  • Case conversion (camelCase, snake_case, kebab-case, etc.)
  • Validation (email, URL, phone, IP addresses, UUID, SemVer)
  • Text analysis (word/character frequency, similarity metrics, reading time)
  • Encoding (Base64, Base32, URL encoding, HTML entities)
  • Formatting (padding, alignment, column layout)

Each tranche will maintain the same standard: avoiding dependencies, comprehensive tests, and clear, predictable APIs.


Resources #

Why Pre-release? #

This is 0.16.x not 1.0.0 because we want real-world feedback before locking the API. We've tested rigorously, but subtle edge cases or API naming preferences often only emerge once developers use a library in anger. Your feedback shapes the final 1.0.0.

0
likes
150
points
70
downloads

Documentation

API reference

Publisher

verified publisherperridak.software

Weekly Downloads

Comprehensive, zero-dependency string utilities for Dart and Flutter. Fast, safe, and rigorously tested.

Homepage

Topics

#strings #text #utilities #formatting

License

MIT (license)

Dependencies

characters

More

Packages that depend on perridak_strings