From 312f895f93221abc9a05c9440ff03fab8a8a06ce Mon Sep 17 00:00:00 2001 From: Hans Kokx Date: Wed, 6 Nov 2024 12:38:50 +0100 Subject: [PATCH] v1.2.3 - Adjusted `capitalize` extension to convert remaining letters to lowercase Signed-off-by: Hans Kokx --- CHANGELOG.md | 4 ++++ lib/arcane_helper_utils.dart | 3 ++- lib/src/extensions/string.dart | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db136a3..2bff1d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.3 + +- Adjusted `capitalize` extension to convert remaining letters to lowercase + ## 1.2.2 - Added additional `String` manipulation utilities, including: diff --git a/lib/arcane_helper_utils.dart b/lib/arcane_helper_utils.dart index 19110ad..1ff61cc 100644 --- a/lib/arcane_helper_utils.dart +++ b/lib/arcane_helper_utils.dart @@ -2,7 +2,8 @@ library arcane_helper_utils; export "package:arcane_helper_utils/src/extensions/date_time.dart"; export "package:arcane_helper_utils/src/extensions/list.dart"; -export "package:arcane_helper_utils/src/extensions/string.dart"; +export "package:arcane_helper_utils/src/extensions/string.dart" + show Nullability, Split, TextManipulation, CommonString; export "package:arcane_helper_utils/src/extensions/string_jwt.dart"; export "package:arcane_helper_utils/src/utils/json_converter.dart"; export "package:arcane_helper_utils/src/utils/ticker.dart"; diff --git a/lib/src/extensions/string.dart b/lib/src/extensions/string.dart index 555203a..b345b49 100644 --- a/lib/src/extensions/string.dart +++ b/lib/src/extensions/string.dart @@ -80,7 +80,7 @@ extension TextManipulation on String { /// Capitalizes the first letter of the string. /// /// This method returns a new string where the first character is converted - /// to uppercase, while the rest of the string remains unchanged. + /// to uppercase, while the rest of the string is converted to lowercase. /// /// Example: /// ```dart @@ -89,7 +89,7 @@ extension TextManipulation on String { /// ``` String get capitalize { if (isEmpty) return ""; - return "${this[0].toUpperCase()}${substring(1)}"; + return "${this[0].toUpperCase()}${substring(1).toLowerCase()}"; } /// Capitalizes the first letter of each word in the string. diff --git a/pubspec.yaml b/pubspec.yaml index 1cab659..09ff0cd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: arcane_helper_utils description: Provides a variety of helpful utilities and extensions for Flutter and Dart. -version: 1.2.2 +version: 1.2.3 repository: https://github.com/hanskokx/arcane_helper_utils issue_tracker: https://github.com/hanskokx/arcane_helper_utils/issues