Skip to content

Instantly share code, notes, and snippets.

@gindemit
Last active August 19, 2018 04:23
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 gindemit/f24017cc9a7bea2517aa669944696338 to your computer and use it in GitHub Desktop.
Save gindemit/f24017cc9a7bea2517aa669944696338 to your computer and use it in GitHub Desktop.
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