- Adjusted `capitalize` extension to convert remaining letters to lowercase

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
This commit is contained in:
Hans Kokx
2024-11-06 12:38:50 +01:00
parent 440b31186e
commit 312f895f93
4 changed files with 9 additions and 4 deletions
+4
View File
@@ -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:
+2 -1
View File
@@ -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";
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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