Skip to content

Instantly share code, notes, and snippets.

@Siliconrob
Created December 19, 2019 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Siliconrob/4b6435e37800733ef0853f3cf687bb5d to your computer and use it in GitHub Desktop.
Save Siliconrob/4b6435e37800733ef0853f3cf687bb5d to your computer and use it in GitHub Desktop.
using System;
namespace EqualTest
{
class Program
{
static void Main(string[] args)
{
var ohdear = new
{
// https://www.fileformat.info/info/unicode/char/fffd/index.htm
// Unicode replacement character
UNICODE = StringComparer.InvariantCulture.Equals("", "\uFFFD"),
//https://www.fileformat.info/info/unicode/char/00df/index.htm
// Latin small s guess it is turning it to German letter?
IS = "\u00DF".StartsWith("ss", StringComparison.InvariantCulture),
// Normal
THE = "ss".StartsWith("s", StringComparison.InvariantCulture),
// Not exactly consistent
DEVIL = "\u00DF".StartsWith("s", StringComparison.InvariantCulture)
};
Console.WriteLine($"UNICODE {ohdear.UNICODE}");
Console.WriteLine($"IS {ohdear.IS}");
Console.WriteLine($"THE {ohdear.THE}");
Console.WriteLine($"DEVIL {ohdear.DEVIL}");
}
}
}
// Program Output
/*
UNICODE True
IS True
THE True
DEVIL False
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment