Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 841 Bytes

README.rdoc

File metadata and controls

40 lines (23 loc) · 841 Bytes

korean-string

Split Korean characters to individual compontents, join components together to create characters.

You could use it to make some weird conjugation rules. Go wild.

Methods

String.split_ko

Return an array of arrays of Korean character components

require 'korean-string'
'읽어싶'.split_ko
=> [["ㅇ", "ㅣ", "ㄺ"], ["ㅇ", "ㅓ"], ["ㅅ", "ㅣ", "ㅍ"]]

Array.join_ko

Accepts an array of character pieces

require 'korean-string'
[["ㅇ", "ㅣ", "ㄺ"], ["ㅇ", "ㅓ"], ["ㅅ", "ㅣ", "ㅍ"]].join_ko
=> '읽어싶'

Publish

$ gem build korean-string.gemspec

$ gem push –key github \ –host rubygems.pkg.github.com/daangn \ korean-string-0.1.0.gem

Todo

Come up with other useful methods?

Copyright © 2010 Ben Humphreys. See LICENSE for details.