require "chise/character"
require "chise/parser"
+require "chise/ids"
class String
+ include CHISE::StringIDS
+
# copied from htree/encoder.rb
UTF8_RE = /\A(?:
[\x00-\x7f]
CHISE::Character.get("?"+self)
end
- def method_missing(mid, *args)
- char.method_missing(mid, *args)
+ def method_missing(mid, *args, &block)
+ #char.method_missing(mid, *args)
+ char.send(mid, *args, &block)
end
def to_a
}
end
+ def map_char
+ to_a.map {|c|
+ yield(c).to_s
+ }.join
+ end
+
def each_character
to_a.each {|ch|
yield ch.char
pa.de_er(self)
end
+ def to_ids
+ CHISE::IDS.new(self)
+ end
+
end