feat: add Patcher API.

This commit is contained in:
Alberto Ponces
2022-08-06 14:04:18 +01:00
parent 57b932fd23
commit fc06f8d571
13 changed files with 403 additions and 93 deletions

8
lib/utils/string.dart Normal file
View File

@ -0,0 +1,8 @@
extension StringCasingExtension on String {
String toCapitalized() =>
length > 0 ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';
String toTitleCase() => replaceAll(RegExp(' +'), ' ')
.split(' ')
.map((str) => str.toCapitalized())
.join(' ');
}