Files
PiliPlus/lib/utils/extension/string_ext.dart
bggRGjQaUbCoE 0baf3fcd36 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-16 15:56:54 +08:00

8 lines
231 B
Dart

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