Makes a case-sensitive comparison of two URL strings.
#Include <WinAPIEx.au3>
_WinAPI_UrlCompare ( $sUrl1, $sUrl2 [, $fIgnoreSlash] )
$sUrl | The first URL. |
$sPart | The second URL. |
$fIgnoreSlash | [可选参数] Specifies whether to ignore a trailing '/' character on either or both URLs, valid values: TRUE - The function ignores a trailing characters. FALSE - The function takes into account the trailing characters. (Default) |
Success | 0 - The URLs are equal. |
1 - The first URL is greater than the second URL. | |
(-1)- The first URL is less than the second URL. | |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Url1 = 'http://xyz/abc/'
Global $Url2 = 'http://xyz/abc'
ConsoleWrite('URLs comparison result: ' & _WinAPI_UrlCompare($Url1, $Url2) & @CR)