Files
PiliPlus/lib/utils/extension/string_ext.dart
dom 90d79b236f custom player/max volume
Closes #2199
Closes #2358

Signed-off-by: dom <githubaccount56556@proton.me>
2026-06-09 10:38:55 +08:00

15 lines
387 B
Dart

final _regExp = RegExp("^(http:)?//", caseSensitive: false);
extension NullableStringExt on String? {
String get http2https => this?.replaceFirst(_regExp, "https://") ?? '';
bool get isNullOrEmpty => this == null || this!.isEmpty;
}
extension StringExt on String {
String subLength(int length) {
if (this.length < length) return this;
return substring(0, length);
}
}