mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
7
lib/utils/extension/string_ext.dart
Normal file
7
lib/utils/extension/string_ext.dart
Normal file
@@ -0,0 +1,7 @@
|
||||
final _regExp = RegExp("^(http:)?//", caseSensitive: false);
|
||||
|
||||
extension StringExt on String? {
|
||||
String get http2https => this?.replaceFirst(_regExp, "https://") ?? '';
|
||||
|
||||
bool get isNullOrEmpty => this == null || this!.isEmpty;
|
||||
}
|
||||
Reference in New Issue
Block a user