Skip to content

Instantly share code, notes, and snippets.

@jz5
Created December 28, 2016 06:08
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 jz5/96939458a2eb1341722974406fc2b73c to your computer and use it in GitHub Desktop.
Save jz5/96939458a2eb1341722974406fc2b73c to your computer and use it in GitHub Desktop.
class Program
{
static void Main(string[] args)
{
var names = new[] {
"あさみ りな",
"なみき なおと",
"いで なおと",
"はなおか なつき",
"まつうら やすふみ",
"おき ようすけ",
"おざき あやこ",
"うみの さき",
"こいけ いくじ",
"こじま こうじ"};
// 並び替え
foreach (var n in names.OrderBy(i => i, new IrohaComparer())) {
Console.WriteLine(n);
}
// 出力結果
// いで なおと
// はなおか なつき
// なみき なおと
// うみの さき
// おざき あやこ
// おき ようすけ
// まつうら やすふみ
// こいけ いくじ
// こじま こうじ
// あさみ りな
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment