Funktionreferenz


_WinAPI_UrlCompare


Makes a case-sensitive comparison of two URL strings

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

Parameter

$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).

Rückgabewert

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.

Bemerkungen

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

Siehe auch

Suche nach UrlCompare in der MSDN Bibliothek.

Beispiel

#include <WinAPIShPath.au3>

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

ConsoleWrite('URLs Ergebnis des Vergleichs: ' & _WinAPI_UrlCompare($sUrl1, $sUrl2) & @CRLF)