mizuneko
6/3/2018 - 2:24 PM

[かな変換]カタカナをひらがなに

[かな変換]カタカナをひらがなに

using System;
using System.Linq;

public static class Sample
{
  public static string ToHiragana(this string s)
  {
    return new string(s.Select(c => (c >= 'ァ' && c <= 'ヶ') ? (char)(c + 'ぁ' - 'ァ') : c).ToArray());
  }
}