Last active
August 19, 2018 04:23
-
-
Save gindemit/f24017cc9a7bea2517aa669944696338 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
internal static class UnicodeCharacters | |
{ | |
struct CharacterInfo | |
{ | |
public char character; | |
public char lower; | |
public int characterCode; | |
public int lowerCode; | |
public override string ToString() | |
{ | |
return character + " " + characterCode + " - " + lower + " " + lowerCode; | |
} | |
} | |
public static void PrintUnicodeLowerCharactersToConsole(int startIndex, int endIndex) | |
{ | |
List<CharacterInfo> result = new List<CharacterInfo>(); | |
System.Text.StringBuilder resultStr = new System.Text.StringBuilder(); | |
for (int i = startIndex; i < endIndex; ++i) | |
{ | |
CharacterInfo temp; | |
temp.character = (char)i; | |
temp.lower = temp.character.ToString().ToLowerInvariant()[0]; | |
temp.characterCode = (int)temp.character; | |
temp.lowerCode = (int)temp.lower; | |
result.Add(temp); | |
resultStr.Append(temp.lowerCode); | |
resultStr.Append(","); | |
} | |
Console.WriteLine(resultStr.ToString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment