function doc comments
This commit is contained in:
parent
1368fd855d
commit
459f0c6d10
|
@ -228,12 +228,14 @@ function isValidAndNotEmpty(input as dynamic) as boolean
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' Returns an array from a url of [proto, host, port, subdir/params]
|
||||||
|
' Proto must be declared or array members will be invalid
|
||||||
function parseUrl(url as string) as object
|
function parseUrl(url as string) as object
|
||||||
' proto $1, host $2, port $3, the-rest $4
|
|
||||||
rgx = CreateObject("roRegex", "^(.*:)//([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$", "")
|
rgx = CreateObject("roRegex", "^(.*:)//([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$", "")
|
||||||
return rgx.Match(url)
|
return rgx.Match(url)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' Returns true if the string is a loopback, such as 'localhost' or '127.0.0.1'
|
||||||
function isLocalhost(url as string) as boolean
|
function isLocalhost(url as string) as boolean
|
||||||
' https://stackoverflow.com/questions/8426171/what-regex-will-match-all-loopback-addresses
|
' https://stackoverflow.com/questions/8426171/what-regex-will-match-all-loopback-addresses
|
||||||
rgx = CreateObject("roRegex", "^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$", "i")
|
rgx = CreateObject("roRegex", "^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$", "i")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user