strings
4.2.0, released 4 weeks ago by onepub.dev
Large collection of String functions extending the String class and supporting nullable Strings safely.
What it does
The Strings package provides over 50 functions to complement the core String class. It extends String with helper methods and safely handles nullable strings without throwing errors.
AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need safe string operations that handle null values without throwing exceptions.
- You want to use helper methods like affix removal, partition, and whitespace normalization.
Skip it when
- You need complex regular expression or Unicode normalization matching.
Strengths
- Never throws or returns errors on null inputs, making it robust.
- Provides both static methods and String extension methods.
Weaknesses
- Matching is strictly literal, case-sensitive UTF-16 without regex support.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Strings.right(null, 4, pad: Pad.left);
'a normal string'.right(4);Alternatives
Packages that do the same job and could replace strings.
- string_scanner
A class for parsing strings using a sequence of patterns.
81Compare - validators2
String validation and sanitization for Dart.
83Compare - comprehensive_utils
A collection of performance-oriented tools, widgets, stream helpers, and numeric types.
63Compare - dartx
Collection of useful static extension methods for Dart core types.
50Compare
Works with
Packages commonly used together with strings: ones it builds on, ones built on it, and its own family.
- charactersstrings depends on itUnicode and grapheme cluster aware string manipulation operations for Dart.
- unicodestrings depends on itLibrary providing Unicode character utilities and emoji data generated from Unicode 17.0.0
- pubspec_managerBuilt on stringsType-safe API to read, modify, and write pubspec.yaml while preserving comments.
- onepubBuilt on stringsCommand line tools for the OnePub private Dart and Flutter package repository.