Skip to content

Commit f6a2c17

Browse files
committed
🔧 Update CHANGELOG for version 0.8.4 with multiple bug fixes and performance improvements in string extension methods, including enhancements to character handling and string manipulation efficiency.
1 parent 5f5acf6 commit f6a2c17

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## [0.8.4] - Bug fixes and performance improvements
2+
3+
### Bug Fixes
4+
5+
- Fixes `charOccurences` dropping the last character when it was unique (different from its predecessor)
6+
- Fixes `formatFileSize` throwing `RangeError` for TB+ values by adding "TB" suffix and correcting the loop guard
7+
- Fixes `removeBefore` inconsistent behavior between single-char and multi-char patterns single-char now includes the pattern in the result, matching multi-char behavior
8+
- Fixes nullable `after` and `before` methods using fragile word-splitting logic that could match wrong positions replaced with the same `indexOf` approach used in the non-nullable version
9+
- Fixes `isGreek` returning `bool?` instead of `bool` on non-nullable `String`
10+
- Fixes `leftOf` throwing `Exception` when the character is not found now returns empty string, consistent with `rightOf`
11+
- Fixes `charAt` using `split('')[index]` which allocated a full list on every call now uses direct index access
12+
13+
### Performance Improvements
14+
15+
- Improves `reverse` from O(n²) to O(n) by replacing `reduce` with `split('').reversed.join()`
16+
- Replaces O(n²) `+=` string concatenation with `StringBuffer` in: `toSlug`, `toSnakeCase`, `squeeze`, `swapCase`, `replaceGreek`, `repeat`, and `formatWithMask`
17+
118
## [0.8.3] - Bug fixes, performance, and docs
219

320
- Fixes `charAt` and `replaceAtIndex` so they no longer throw when the index points to the end of the string

‎pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: string_extensions
22
description: Useful String extensions to save you time in production. Feel free
33
to contribute with PR.
4-
version: 0.8.3
4+
version: 0.8.4
55
homepage: "https://github.com/esentis/string_extensions"
66
topics:
77
- extensions

0 commit comments

Comments
 (0)