A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dlackty/pangu.rb below:

dlackty/pangu.rb: Paranoid text spacing in Ruby

Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean), half-width English, digit and symbol characters.

require "pangu"

Pangu.spacing("請問Jackie的鼻子有幾個?123個!")
=> "請問 Jackie 的鼻子有幾個?123 個!"
Pangu.spacing("主要成份:眼鏡95%、水3%、垃圾2%。")                                                                                                                                        
=> "主要成份:眼鏡 95%、水 3%、垃圾 2%。"
Pangu.spacing("新阿姆斯特朗炫風噴射阿姆斯特朗砲")
=> "新阿姆斯特朗炫風噴射阿姆斯特朗砲"

Copyright (c) 2015 Richard Lee. See LICENSE.txt for details.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4