mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
13 lines
275 B
Go
13 lines
275 B
Go
package stringz
|
|
|
|
import "strings"
|
|
|
|
func TrimProtocol(URL string) string {
|
|
URL = strings.TrimSpace(URL)
|
|
if strings.HasPrefix(strings.ToLower(URL), "http://") || strings.HasPrefix(strings.ToLower(URL), "https://") {
|
|
URL = URL[strings.Index(URL, "//")+2:]
|
|
}
|
|
|
|
return URL
|
|
}
|