The hzenhan package

[ Tags: bsd3, library, text ] [ Propose Tags ]

Converter between Full-width Japanese and Half-width Japanese


[Skip to Readme]

Properties

Versions 0.0.1
Dependencies base (>=4.7 && <5), containers, text [details]
License BSD3
Copyright 2017 karky7 Calimakvonia
Author karky7
Maintainer cantimerny.g@gmail.com
Category Text
Home page https://github.com/karky7/hzenhan#readme
Source repository head: git clone https://github.com/karky7/hzenhan
Uploaded Mon Mar 20 07:36:47 UTC 2017 by karky7
Distributions NixOS:0.0.1
Downloads 95 total (13 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-03-20 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hzenhan-0.0.1

[back to package description]

hzenhan

Converter between Full-width Japanese and Half-width Japanese

This module ported Python's zenhan library, similar to the
"zenhan" library found in pypi:

https://pypi.python.org/pypi/zenhan/

Install

Installing from Hackage with stack is straightforward:

> stack install

or gentoo emerge from gentoo-haskell overlay

> layman -a haskell
> emerge dev-haskell/hzenhan

Usage

Let's see an example.

> {-# LANGUAGE OverloadedStrings #-}
>
> import Text.Zenhan
> import Data.Text (pack, unpack)
>
> main :: IO ()
> main = do
>   let h = h2z [Kana, Digit, Ascii] \"A\" \"ABCd\\\\「」アイウエオ123\"
>       z = z2h [Kana, Digit, Ascii] \"Bエ\" h
>   putStrLn $ toString h
>   putStrLn $ toString z