Skip to content

Instantly share code, notes, and snippets.

@sakapon
Last active December 29, 2018 08:55
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 sakapon/3ad3ac212a91c2aacc7b08fbdb151a0b to your computer and use it in GitHub Desktop.
Save sakapon/3ad3ac212a91c2aacc7b08fbdb151a0b to your computer and use it in GitHub Desktop.
Zipangu Sample
using System;
using Zipangu;
namespace ZipanguConsole
{
class Program
{
static void Main(string[] args)
{
// 各メソッドは string の拡張メソッドとして提供されています。
var result1 = "ベートーヴェン、「ピアノ・ソナタ」。".HalfKatakanaToHiragana();
// べーとーゔぇん、「ぴあの・そなた」。
// 変換の種類を組み合わせるには、Convert メソッドを呼び出します。
var result2 = "ももいろクローバーZ".Convert(KanaConv.AllKanaToKatakana, AsciiConv.ToWide);
// モモイロクローバーZ
// EncodingHelper クラスの静的プロパティで各エンコーディングのインスタンスを取得できます。
var result3 = EncodingHelper.ShiftJIS.GetBytes("シャ乱Q");
// { 188, 172, 151, 144, 81 }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment