I use this: `url.replace("(?<!https?:)//".toReg...
# announcements
c
I use this:
url.replace("(?<!https?:)//".toRegex(), "/")
I have it as an extension function in relevant module. But impact is not really noticeable. I haven't run any benchmarks though. And Regex is actually a final val, here it's inlined for brevity.