projects
/
chise
/
ruby.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
update.
[chise/ruby.git]
/
sample
/
sample1.rb
1
#!/usr/bin/env ruby
2
3
$LOAD_PATH.unshift("..")
4
require "chise"
5
6
str = "字" # Stringを拡張している.UTF8で与える.
7
p str.ucs # その文字のucsの値が表示される.
8
p str.total_strokes # 画数が表示される.
9
p str.gb2312 # などなど.
10
str.each_feature {|f, v| # 全素性を表示する.
11
print f, ": ", v, "\n"
12
}