Skip to content

Commit 9cff148

Browse files
committed
+Refactor and clean
1 parent a9b7645 commit 9cff148

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

lib/src/_src.g.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
//.title~
99

1010
export './string_case_types.dart';
11-
export './extensions/string_extension.dart';
12-
export './extensions/string_case_conversions_extension.dart';
11+
export 'extensions/string_ext.dart';
12+
export 'extensions/case_conversions_on_string_ext.dart';
1313
export './force_obj_to_string.dart';

lib/src/extensions/string_case_conversions_extension.dart renamed to lib/src/extensions/case_conversions_on_string_ext.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
1111
//.title~
1212

13-
extension $StringCaseConversionsStringExtension on String {
13+
extension CaseConversionsOnStringExt on String {
1414
/// Converts the string to UPPER_SNAKE_CASE.
1515
/// Example: 'helloWorld' -> 'HELLO_WORLD'
1616
String toUpperSnakeCase() => toSnakeCase().toUpperCase();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
1111
//.title~
1212

13-
extension $StringExtension on String {
13+
extension StringExt on String {
1414
/// Returns null if the String is empty, otherwise returns the String.
1515
String? get nullIfEmpty {
1616
return isEmpty ? null : this;

lib/src/force_obj_to_string.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ String forceObjToString(Object? obj) {
2626
}
2727

2828
/// An extension method for conveniently calling [forceObjToString].
29-
extension ForceObjToStringOnObjectExtension on Object {
29+
extension ForceObjToStringOnObjectExt on Object {
3030
/// Safely converts this object to a string. See [forceObjToString].
3131
String forceObjToString() => _forceObjToString(this);
3232
}

lib/src/string_case_types.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
1111
//.title~
1212

13-
import 'extensions/string_case_conversions_extension.dart';
13+
import 'extensions/case_conversions_on_string_ext.dart';
1414

1515
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1616

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ repository: https://github.com/robmllze/df_string
1616
funding:
1717
- https://www.buymeacoffee.com/dev_cetera
1818
description: A package designed to extend Dart strings by offering additional functionality.
19-
version: 0.2.6
19+
version: 0.2.7
2020
topics:
2121
- dart
2222
- json
2323
- string
2424
- utility
25-
- utils
25+
- tool
2626

2727
## -----------------------------------------------------------------------------
2828

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// --- AI GENERATED TEST ---
2+
13
import 'package:df_string/df_string.dart';
24
import 'package:test/test.dart';
35

@@ -43,8 +45,7 @@ void main() {
4345
expect(
4446
input.toSnakeCase(),
4547
isEmpty,
46-
reason:
47-
'An empty/whitespace input should result in an empty output string.',
48+
reason: 'An empty/whitespace input should result in an empty output string.',
4849
);
4950
} else {
5051
// For all non-empty cases, the original logic works perfectly.

0 commit comments

Comments
 (0)