Giter Club home page Giter Club logo

zipangu's Introduction

Zipangu

license NuGet NuGet

A library for compatibility about Japan.
日本で利用される機能を集めたライブラリです。

Setup

Zipangu は NuGet Gallery に登録されています。
Zipangu を利用するには、Visual Studio の [NuGet パッケージの管理] でインストールするか、
あるいは [パッケージ マネージャー コンソール] で次のコマンドを実行します。

Install-Package Zipangu

NuGet Gallery | Zipangu

Features

文字の変換

.NET Framework の Microsoft.VisualBasic.dll の Strings.StrConv メソッドとの互換性は完全ではありません。
仕様の詳細はこちら

  • ASCII 文字 → 全角 ASCII 文字
  • 全角 ASCII 文字 → ASCII 文字
  • ひらがな → カタカナ
  • カタカナ → ひらがな
  • 半角カタカナ → ひらがな
  • 半角カタカナ → カタカナ

文字エンコーディング

各エンコーディングのインスタンスにアクセスするためのプロパティを提供します。

  • Shift_JIS (932)
  • ISO-2022-JP (50220)
  • EUC-JP (51932)

Usage

まず、Zipangu 名前空間の using ディレクティブを追加します。

using System;
using Zipangu;

文字の変換

各メソッドは拡張メソッドとして提供されています。

// べーとーゔぇん、「ぴあの・そなた」。
var result = "ベートーヴェン、「ピアノ・ソナタ」。".HalfKatakanaToHiragana();

変換の種類を組み合わせるには、Convert メソッドを呼び出します。

// モモイロクローバーZ
var result = "ももいろクローバーZ".Convert(KanaConv.AllKanaToKatakana, AsciiConv.ToWide);

文字エンコーディング

EncodingHelper クラスの静的プロパティで各エンコーディングのインスタンスを取得できます。

// { 188, 172, 151, 144, 81 }
var result = EncodingHelper.ShiftJIS.GetBytes("シャ乱Q");

Target Frameworks

Dependencies

Release Notes

  • v1.1.8 変換される文字を追加。
  • v1.1.6 文字エンコーディングのプロパティを追加。
  • v1.0.3 初版リリース。
  • v1.0.1 β版リリース。

zipangu's People

Contributors

sakapon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zipangu's Issues

文字変換の仕様変更

  • HiraganaToKatakana
    • ゕゖ > ヵヶ
  • KatakanaToHiragana
    • ヵヶ > ゕゖ
  • HalfKatakanaToKatakana
    • ヺヷ > ヺヷ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.