jp-numeral

2016-04-21

Abstract

Common Lisp ??????????????????cl:format ????????

This is a fun package for printing numbers as Japanese numerals. This can be integrated with cl:format.

License

The MIT License. See LICENSE file.

Loading

Libraries depending on

  • asdf
  • babel
  • alexandria

Loading

(load "jp-numeral.asd")
(asdf:load-system :jp-numeral)

For running tests, do below additionally.

(load "jp-numeral-test.asd")
(asdf:test-system :jp-numeral)

Examples

??????????? / Puts as (normal) Japanese numerals.

CL-USER> (format nil "~/jp-numeral:jp/" 12345687890)
"???????????????????"

CL-USER> (format nil "~/jp-numeral:jp/" 123/4567)
"?????????????"

CL-USER> (format nil "~/jp-numeral:jp/" -0.0245)
"??????????"

????????? / Puts as rate or yen.

??????

Puts as a rate (using ?).

CL-USER> (format nil "~/jp-numeral:wari/" 0.123)
"??????"

?????

Puts as yen (?).

CL-USER> (format nil "~/jp-numeral:yen/" 12000.67)
"?????????"

??????? / Puts as formal numbers.

: ?????????

Use : modifier.

CL-USER> (format nil "~:/jp-numeral:jp/" 12345687890)
"????????????????????"

?????????

Puts as a formal rate.

CL-USER> (format nil "~:/jp-numeral:wari/" 0.123)
"??????"

????????

Puts as a formal yen.

CL-USER> (format nil "~:/jp-numeral:yen/" 12000.67)
"?????????"

???????? / Puts with old glyphs.

@ ?????????

Use @ modifier.

CL-USER> (format nil "~@/jp-numeral:jp/" 12345687890)
"????????????????????"

?????????

Puts as a rate with old glyphs.

CL-USER> (format nil "~@/jp-numeral:wari/" 0.123)
"??????"

????????

Puts as a yen with old glyphs.

CL-USER> (format nil "~@/jp-numeral:yen/" 12000.67)
"?????????"

??????????? / Puts with positional notation.

: ???? @ ?????????

Use both : and @ modifier.

CL-USER> (format nil "~@:/jp-numeral:jp/" 12345687890)
"???????????"

API

see API.md.

Author
YOKOTA Yuki <y2q.actionman@gmail.com>
License
MIT