hzenhan-0.0.1: Zenhan library for Haskell

Copyright2017 karky7 Calimakvonia
LicenseBSD3
Maintainercantimerny.g@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Text.Zenhan

Description

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

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

Let's see an example.


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

This library is still a work-in-progress, and contributions are welcome for missing pieces and to fix bugs. Please see the Github page to contribute with code or bug reports:

https://github.com/karky7/hzenhan

Synopsis

Documentation

z2h Source #

Arguments

:: [Mode]

Type of character to be converted

-> Text

Conversion exclusion character

-> Text

Characters to be converted

-> Text

Result

Convert from Full-width Japanese character to Half-width Japanese character

h2z Source #

Arguments

:: [Mode]

Type of character to be converted

-> Text

Conversion exclusion character

-> Text

Characters to be converted

-> Text

Result

Convert from Half-width Japanese character to Full-width Japanese character

toString :: Text -> String Source #

Convert to String

data Mode Source #

Type for character type to be converted

Constructors

Kana 
Digit 
Ascii 

Instances

Eq Mode Source # 

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Show Mode Source # 

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #