We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f0f691 commit dc54d27Copy full SHA for dc54d27
extensionslib/src/main/java/com/omega_r/libs/extensions/string/UrlExtensions.kt
@@ -0,0 +1,7 @@
1
+package com.omega_r.libs.extensions.string
2
+
3
+import java.util.regex.Pattern
4
5
+private val PATTERN_ABSOLUTE_URL = Pattern.compile("\\A[a-z0-9.+-]+://.*", Pattern.CASE_INSENSITIVE)
6
7
+fun String.isAbsoluteUrl(): Boolean = PATTERN_ABSOLUTE_URL.matcher(this).matches()
0 commit comments