7.7
pangu
Link to this document with
@other-doc['(lib "pangu/scribblings/pangu.scrbl")]
Link to this document with
@other-doc['(lib "pangu/scribblings/pangu.scrbl")]
1 English
Link to this section with
@secref["English" #:doc '(lib "pangu/scribblings/pangu.scrbl")]
Link to this section with
@secref["English" #:doc '(lib "pangu/scribblings/pangu.scrbl")]
Paranoid text spacing for Racket.
Add spaces around CJK characters to make them less cramped.
This is a port of the pangu family of libraries. Specifically, the regexps and the test suite are all directly ported from vinta/pangu.py.
2 Mandarin
Link to this section with
@secref["Mandarin" #:doc '(lib "pangu/scribblings/pangu.scrbl")]
Link to this section with
@secref["Mandarin" #:doc '(lib "pangu/scribblings/pangu.scrbl")]
@vinta的盤古之白移植到Racket上。
基本上是Python版的直譯。
3 Reference
Link to this section with
@secref["Reference" #:doc '(lib "pangu/scribblings/pangu.scrbl")]
Link to this section with
@secref["Reference" #:doc '(lib "pangu/scribblings/pangu.scrbl")]
Returns a new string with pangu spacing applied.
Examples:
> (spacing "為什麼小明有問題都不Google?因為他有Bing") |
"為什麼小明有問題都不 Google?因為他有 Bing" |
> (spacing "當你凝視著bug,bug也凝視著你") |
"當你凝視著 bug,bug 也凝視著你" |
Apply pangu spacing to the file’s contents, and return it as a string.