Skip to main content

strings 4.2.0 copy "strings: ^4.2.0" to clipboard
strings: ^4.2.0 copied to clipboard

Large collection of String functions aimed at extending the String class whilst providing safer methods for working with nullable Strings.

4.2.0 #

  • Add countMatches for non-overlapping literal counting.
  • Add substringAfter, substringAfterLast and substringBeforeLast.
  • Add normalizeSpace using the existing whitespace definition.
  • Add replaceLineEndings with LF by default and a literal custom replacement.
  • Expose all six additions through nullable Strings statics and StringEx extensions.
  • Document and test null/empty arguments, UTF-16 boundaries and Unicode whitespace.
  • Preserve all existing behavior, dependency constraints and the Dart 3.7 SDK floor.

4.1.0 #

  • Add removePrefix and removeSuffix for removing one literal affix.
  • Add partition and lastPartition for splitting once while retaining the delimiter.
  • Expose all four methods through nullable Strings statics and StringEx extensions.
  • Document and test null/empty arguments, missing delimiters and UTF-16 matching.
  • No new dependencies or changes to the Dart SDK requirement.

4.0.1 #

  • add new method conjuctionJoin.

4.0.0 #

BREAKING CHANGES #

  • ⚠️ Minimum Dart SDK is now >=3.7.0. This version drops support for Dart 3.0–3.6 in order to upgrade to the latest version of the unicode package.
  • ⚠️ If you are on an older Dart version, you can continue using version ^3.1.2.

INTERNAL CHANGES #

  • Updated internal usage of unicode.generalCategories constants to use lowercase fields (e.g. unicode.control instead of unicode.CONTROL), per the latest unicode API in 1.1.8.
  • No changes to the public API.

3.1.2 #

  • added an option to the join function to excluded null or empty elements.

3.1.1 #

  • add the method isDigits.

3.1.0 #

  • add the within and upTo methods.

3.0.0 #

  • migrated to dart 3.x
  • added isWhitespace method.

2.0.3 #

  • added method orElseOnBlank

2.0.2 #

  • Improvements to the API documentation.
  • Updated references to underscore to its new name toSnakeCase Fixed the StringEx class description.

2.0.1 #

  • Documenation fixes.

2.0.0-beta.3 #

  • added documentation link to pubspec
  • added onepub logo

2.0.0-beta.2 #

  • Fixed broken links on the readme page.

2.0.0-beta.1 #

BREAKING #

  • the right method has been redefined to be in keeping with the conventional use of right() For existing code that uses the old version of right use string.substring(fromRight);
  • All methods are now exposed as static methods of the 'Strings' class.

1.0.0 #

  • Initial release
58
likes
160
points
162k
downloads

Documentation

Documentation
API reference

Publisher

verified publisheronepub.dev

Weekly Downloads

Large collection of String functions aimed at extending the String class whilst providing safer methods for working with nullable Strings.

Repository (GitHub)
View/report issues

License

BSD-3-Clause, MIT (license)

Dependencies

characters, unicode

More

Packages that depend on strings