feature: Video quality options (#234)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-02-23 13:29:59 +01:00 committed by GitHub
parent 957ad6c991
commit 935d6fe176
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 644 additions and 232 deletions

View file

@ -31,13 +31,15 @@ extension StringExtensions on String {
return buffer.toString();
}
String toUpperCaseSplit() {
String toUpperCaseSplit({RegExp? regExp}) {
String result = '';
RegExp defaultRegex = regExp ?? RegExp(r'^[a-zA-Z]+$');
for (int i = 0; i < length; i++) {
if (i == 0) {
result += this[i].toUpperCase();
} else if ((i > 0 && this[i].toUpperCase() == this[i])) {
} else if ((i > 0 && this[i].toUpperCase() == this[i]) && defaultRegex.hasMatch(this[i]) == true) {
result += ' ${this[i].toUpperCase()}';
} else {
result += this[i];