removeUrlProtocol method
移除 URL 协议(http:// / https://)。null / 空串返回 ''。
Implementation
String removeUrlProtocol() {
final s = this;
if (s == null || s.isEmpty) return s ?? '';
return s.replaceFirst(RegExp(r'https?:\/\/'), '');
}
移除 URL 协议(http:// / https://)。null / 空串返回 ''。
String removeUrlProtocol() {
final s = this;
if (s == null || s.isEmpty) return s ?? '';
return s.replaceFirst(RegExp(r'https?:\/\/'), '');
}