Skip to content
This repository was archived by the owner on Oct 12, 2024. It is now read-only.

Commit c852640

Browse files
committed
Improve string case conversion logic and performance
1 parent da89e7c commit c852640

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/src/strings/src/string_case_types.dart

+10-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,16 @@ String convertToStringCaseType(
147147
}
148148
}
149149

150-
extension ConvertStringOnStringCaseTypeExtension on StringCaseType {
151-
/// Converts a string to a specific case type.
152-
String convertString(String value) {
150+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
151+
152+
extension ConvertOnStringCaseTypeExtension on StringCaseType {
153+
/// Converts [value] to a specific case type.
154+
String convert(String value) {
153155
return convertToStringCaseType(value, this);
154156
}
157+
158+
/// Converts [values] to a specific case type.
159+
Iterable<String> convertAll(Iterable<String> values) {
160+
return values.map((e) => this.convert(e));
161+
}
155162
}

0 commit comments

Comments
 (0)