Last active
December 29, 2018 08:55
-
-
Save sakapon/3ad3ac212a91c2aacc7b08fbdb151a0b to your computer and use it in GitHub Desktop.
Zipangu Sample
This file contains 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
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