Function Reference


_WinAPI_UrlCompare

Makes a case-sensitive comparison of two URL strings

#include <WinAPIShPath.au3>
_WinAPI_UrlCompare ( $sUrl1, $sUrl2 [, $bIgnoreSlash = False] )

Parameters

$sUrl1 The first URL.
$sUrl2 The second URL.
$bIgnoreSlash [optional] 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).

Return Value

Returns 0 - The URLs are equal.
>0 - The first URL is greater than the second URL.
<0 - The first URL is less than the second URL.

Remarks

For best results, you should first canonicalize the URLs with _WinAPI_UrlCanonicalize(). Then, compare the
canonicalized URLs with _WinAPI_UrlCompare().

See Also

Search UrlCompare in MSDN Library.

Example

#include <WinAPIShPath.au3>

Local $sUrl1 = 'http://xyz/abc/'
Local $sUrl2 = 'http://xyz/abc'

ConsoleWrite('URLs comparison result: ' & _WinAPI_UrlCompare($sUrl1, $sUrl2) & @CRLF)