mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-17 02:48:47 +01:00
14 lines
256 B
Dart
14 lines
256 B
Dart
String cleanUpUrl(String url) {
|
|
if (url.startsWith('https://')) {
|
|
url = url.substring(8);
|
|
}
|
|
if (url.startsWith('www.')) {
|
|
url = url.substring(4);
|
|
}
|
|
if (url.endsWith('/')) {
|
|
url = url.substring(0, url.length - 1);
|
|
}
|
|
|
|
return url;
|
|
}
|