Created
December 19, 2019 14:05
-
-
Save Siliconrob/4b6435e37800733ef0853f3cf687bb5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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