Skip to content

caguiclajmg/WanaKanaSharp

Repository files navigation

ワナカナ <--> WanaKanaSharp <--> わなかな

A .NET utility library for checking and converting between Hiragana, Katakana and Romaji

This project is a port of 🐊 WanaKana 🦀

Status

Travis CI AppVeyor

Usage

Pre-built packages are available from NuGet

Visual Studio

Search for WanaKanaSharp on NuGet Package Manager

NuGet Package Manager

.NET Core

Navigate to your project's directory and do: dotnet add package WanaKanaSharp

Examples

    using WanaKanaSharp;

    WanaKana.IsRomaji("hello"); // true
    WanaKana.IsHiragana("こんにちは"); // true
    WanaKana.IsKatakana("テレビ"); // true
    WanaKana.IsKana("これはキュートです") // true
    WanaKana.IsKanji("日本語") // true

    // Hepburn Romanization
    var hepburnConverter = new HepburnConverter();
    WanaKana.ToRomaji(hepburnConverter, "ひらがな"); // hiragana
    WanaKana.ToRomaji(hepburnConverter, "カタカナ"); // katakana
    WanaKana.ToRomaji(hepburnConverter, "今日 は パーティ", upcaseKatakana = true); // 今日 ha PAATEI