Skip to content

Instantly share code, notes, and snippets.

@hoehrmann
Created June 2, 2013 21:28
Show Gist options
  • Save hoehrmann/5695046 to your computer and use it in GitHub Desktop.
Save hoehrmann/5695046 to your computer and use it in GitHub Desktop.
using System;
class UriEq
{
static void Main(String[] Args)
{
Uri uri1 = new Uri("http://www.example.org/%61");
Uri uri2 = new Uri("http://www.example.org/a");
System.Console.WriteLine(uri1.Equals(uri2));
}
}
import java.net.URL;
public class UriEq
{
public static void main(String[] args)
{
try
{
URL uri1 = new URL("http://www.example.org/%61");
URL uri2 = new URL("http://www.example.org/a");
System.out.println(uri1.equals(uri2));
}
catch (Exception e)
{
System.err.println(e);
}
}
}
#!perl -w
use strict;
use warnings;
use URI;
my $uri1 = URI->new("http://www.example.org/%61");
my $uri2 = URI->new("http://www.example.org/a");
print "equal" if $uri1->eq($uri2);
#include <stdio.h>
#include <stdlib.h>
#include <shlwapi.h>
#pragma comment(lib, "shlwapi.lib")
int main(void)
{
LPCTSTR uri1 = "http://www.example.org/%61";
LPCTSTR uri2 = "http://www.example.org/a";
if (UrlCompare(uri1, uri2, FALSE) == 0)
{
printf("equal\n");
}
else
{
printf("not equal\n");
}
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment